st_astext | R Documentation |
Return Well-known Text representation of simple feature geometry or coordinate reference system
st_astext(x, digits = options("digits"), ..., EWKT = FALSE)
st_asewkt(x, digits = options("digits"))
x |
object of class |
digits |
integer; number of decimal digits to print |
... |
ignored |
EWKT |
logical; use PostGIS Enhanced WKT (includes srid) |
The returned WKT representation of simple feature geometry conforms to the
simple features access specification and extensions (if EWKT = TRUE
),
known as EWKT, supported by
PostGIS and other simple features implementations for addition of SRID to a WKT string.
st_asewkt()
returns the Well-Known Text (WKT) representation of
the geometry with SRID meta data.
library(sf)
pt <- st_sfc(st_point(c(1.0002,2.3030303)), crs = 4326)
st_astext(pt, 3)
st_asewkt(pt, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.