getScoresForWKT: Get a dataframe of scores from a WKT input

Description Usage Arguments Value Examples

Description

WKT is used to pass information between compactnesslib and its higher level interfaces. This function takes a WKT string of a polygon or a multipolygons and returns its scores as a data frame. The coordinates must be appropriate: latlong cannot be used.

Usage

1
getScoresForWKT(wkt_str, scores = c("all"))

Arguments

wkt_str

WKT representing feature to be scored.

scores

List of scores to include, a subset of 'getListOfScores()'

Value

A data frame with scores as columns, including the id column.

Examples

1
2
3
4
library(mandeR)
dists   <- sf::st_read(mass_cd())
wkt_str <- st_as_text(st_geometry(dists)[[1]])
mandeR::getScoresForWKT(wkt_str)

gerrymandr/mandeR documentation built on May 26, 2019, 6:35 a.m.