format_coords {arcpullr} | R Documentation |
Convert coordinates from an 'sf' object to formatted well-known text
Description
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.
Usage
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)
Arguments
sf_obj |
An sf object |
geom_type |
Either "points", "paths", or "rings". Choose wisely |
Details
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
Value
String of well known text
Examples
mke_polygon_coords <- format_polygon_coords(mke_county)
[Package arcpullr version 0.2.9 Index]