Description Usage Arguments Details
Convert sfc object to an WKB object
1 2 3 4 5 6 7 8 9 | st_as_binary(x, ...)
## S3 method for class 'sfc'
st_as_binary(x, ..., EWKB = FALSE, endian = .Platform$endian,
pureR = FALSE, precision = attr(x, "precision"), hex = FALSE)
## S3 method for class 'sfg'
st_as_binary(x, ..., endian = .Platform$endian, EWKB = FALSE,
pureR = FALSE, hex = FALSE)
|
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. |
hex |
logical; return hexadecimal encoded (character)? |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.