Learn R Programming

sf (version 0.2-2)

st_as_binary: convert sfc object to an WKB object

Description

convert sfc object to an WKB object

Usage

st_as_binary(x, ...)
"st_as_binary"(x, ..., EWKB = FALSE, endian = .Platform$endian, pureR = FALSE, precision = attr(x, "precision"))
"st_as_binary"(x, ..., endian = .Platform$endian, EWKB = FALSE, pureR = FALSE)

Arguments

x
object to convert
...
ignored
EWKB
logical; use EWKB (PostGIS), or (default) ISO-WKB?
endian
character; either "big" or "little"; default: use that of platform
pureR
logical; use pure R solution, or C++?
precision
numeric; if zero, do not modify; to reduce precision: negative values convert to float (4-byte real); positive values convert to round(x*precision)/precision. See details.

Details

for the precion model, see also http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/PrecisionModel.html. There, it is written that: ``... to specify 3 decimal places of precision, use a scale factor of 1000. To specify -3 decimal places of precision (i.e. rounding to the nearest 1000), use a scale factor of 0.001.''. Note that ALL coordinates, so also Z or M values (if present) are affected.