sp_from_wkt | R Documentation |
sp_from_wkt
creates geometries from WKT strings and can create spatial
data frames from the other variables contained within the input data frame.
sp_from_wkt
is useful after querying a PostGIS database for geometries
in WKT format.
sp_from_wkt(
df,
wkt = "geom",
data = TRUE,
keep = FALSE,
projection = NA,
verbose = FALSE
)
df |
Data frame containing a WKT string variable. |
wkt |
Variable name of WKT strings in |
data |
Should variables other than |
keep |
Should the |
projection |
A proj4 string to force the projection system after the WKT
strings have been parsed. Default is |
verbose |
Should the function give messages? Useful when large number of
WKT strings are to be parsed. Default is |
Stuart K. Grange
## Not run:
# Make a spatial object from many wkt strings
sp_wkt <- sp_from_wkt(data_wkt, wkt = "geom")
# Make a spatial-data frame object from many wkt strings
sp_wkt_with_data <- sp_from_wkt(data_wkt, wkt = "geom", data = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.