wk_format {wk} | R Documentation |
Format well-known geometry for printing
Description
Provides an abbreviated version of the well-known text representation of a geometry. This returns a constant number of coordinates for each geometry, so is safe to use for geometry vectors with many (potentially large) features. Parse errors are passed on to the format string and do not cause this handler to error.
Usage
wk_format(handleable, precision = 7, trim = TRUE, max_coords = 6, ...)
wkt_format_handler(precision = 7, trim = TRUE, max_coords = 6)
Arguments
handleable |
A geometry vector (e.g., |
precision |
If |
trim |
Use |
max_coords |
The maximum number of coordinates to include in the output. |
... |
Passed to the |
Value
A character vector of abbreviated well-known text.
Examples
wk_format(wkt("MULTIPOLYGON (((0 0, 10 0, 0 10, 0 0)))"))
wk_format(new_wk_wkt("POINT ENTPY"))
wk_handle(
wkt("MULTIPOLYGON (((0 0, 10 0, 0 10, 0 0)))"),
wkt_format_handler()
)