format_coords | R Documentation |
Use this function to convert the coordinates of a sf polygon object to a string of well known text. The output can be passed to an ArcGIS REST API to perform a spatial query.
format_polygon_coords(sf_obj)
format_line_coords(sf_obj)
format_multipoint_coords(sf_obj)
format_point_coords(sf_obj)
format_envelope_coords(sf_obj)
format_coords(sf_obj, geom_type)
sf_obj |
An sf object |
geom_type |
Either "points", "paths", or "rings". Choose wisely |
Spatial queries from an ArcGIS REST API require specific text inputs formatted in a way called well-known text (WKT). ArcGIS REST APIs have their own syntax for how the text is taken. These functions will format sf objects in the correct way to be able to make spatial queries from a ArcGIS REST API
String of well known text
mke_polygon_coords <- format_polygon_coords(mke_county)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.