st_astext: Return Well-known Text representation of simple feature...

Description Usage Arguments Details Examples

View source: R/wkt.R

Description

Return Well-known Text representation of simple feature geometry or coordinate reference system

Usage

1
2
3
st_astext(x, digits = options("digits"), ..., EWKT = FALSE)

st_asewkt(x, digits = options("digits"))

Arguments

x

object of class sfg, sfc, or sf

digits

integer; number of decimal digits to print

...

ignored

EWKT

logical; use PostGIS Enhanced WKT (includes srid)

Details

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.

Examples

1
2
3
4
library(sf)
pt <- st_sfc(st_point(c(1.0002,2.3030303)), crs = 4326)
st_astext(pt, 3)
st_asewkt(pt, 3)

lwgeom documentation built on Oct. 6, 2021, 5:12 p.m.

Related to st_astext in lwgeom...