wktdf2sp | R Documentation |
Many queries to the DOPA API return a response object that has the spatial geometry stored as a WKT MULTIPOLYGON data. This function converts the input data frame into a SpatialPolygonsDataFrame.
wktdf2sp(x, wkt.col, p4s = "+init=epsg:4326")
x |
Data frame containing all the necessary data. |
wkt.col |
Character string name of the column containing the WKT data. |
p4s |
Either a character string or an object of class CRS. (default: "+init=epsg:4326") |
A functional installation of rgeos
is needed.
A SpatialPolygonsDataFrame.
Joona Lehtomaki <joona.lehtomaki@gmail.com>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.