geos_make_point {geos} | R Documentation |
Create geometries from vectors of coordinates
Description
These functions transform raw coordinates into point, line, polygon,
features, or nest a vector of geometries into a MULTI* type or
GEOMETRYCOLLECTION. See wk::wk_coords()
, geos_unnest()
, or
wk::wk_flatten()
to perform inverse operations; see wk::xy()
,
wk::wk_linestring()
, wk::wk_polygon()
, or wk::wk_collection()
for
generic versions that work with non-GEOS types.
Usage
geos_make_point(x, y, z = NA_real_, crs = NULL)
geos_make_linestring(x, y, z = NA_real_, feature_id = 1L, crs = NULL)
geos_make_polygon(
x,
y,
z = NA_real_,
feature_id = 1L,
ring_id = 1L,
crs = NULL
)
geos_make_collection(geom, type_id = "geometrycollection", feature_id = 1L)
Arguments
x , y , z |
Vectors of coordinate values |
crs |
An object that can be interpreted as a CRS. See |
feature_id , ring_id |
Vectors for which a change in sequential values
indicates a new feature or ring. Use |
geom |
|
type_id |
The numeric type identifier for which an
empty should be returned, an object from which
one can be extracted using |
Value
Examples
geos_make_point(1:3, 1:3)
geos_make_linestring(1:3, 1:3)
geos_make_polygon(c(0, 1, 0), c(0, 0, 1))
geos_make_collection("POINT (1 1)")