geos_read_wkt {geos} | R Documentation |
Read and write well-known text
Description
Read and write well-known text
Usage
geos_read_wkt(wkt, fix_structure = FALSE, crs = NULL)
geos_write_wkt(geom, include_z = TRUE, precision = 16, trim = TRUE)
geos_read_geojson(geojson, crs = NULL)
geos_write_geojson(geom, indent = -1)
geos_read_wkb(wkb, fix_structure = FALSE, crs = NULL)
geos_write_wkb(
geom,
include_z = TRUE,
include_srid = FALSE,
endian = 1,
flavor = c("extended", "iso")
)
geos_read_hex(hex, fix_structure = FALSE, crs = NULL)
geos_write_hex(
geom,
include_z = TRUE,
include_srid = FALSE,
endian = 1,
flavor = c("extended", "iso")
)
geos_read_xy(point)
geos_write_xy(geom)
Arguments
wkt |
a |
fix_structure |
Set the reader to automatically repair structural errors in the input (currently just unclosed rings) while reading. |
crs |
An object that can be interpreted as a CRS. See |
geom |
|
include_z , include_srid |
Include the values of the Z and M coordinates and/or
SRID in the output?
Use |
precision |
The number of significant digits to include iin WKT output. |
trim |
Trim unnecessary zeroes in the output? |
geojson |
A |
indent |
The number of spaces to use when indenting a formatted version of the output. Use -1 to indicate no formatting. |
wkb |
A |
endian |
0 for big endian or 1 for little endian. |
flavor |
One of "extended" (i.e., EWKB) or "iso". |
hex |
A hexidecimal representation of well-known binary |
point |
A |
Examples
geos_read_wkt("POINT (30 10)")
geos_write_wkt(geos_read_wkt("POINT (30 10)"))