g_swap_xy | R Documentation |
g_swap_xy()
swaps x and y coordinates of the input geometry.
Wrapper of OGR_G_SwapXY()
in the GDAL API.
g_swap_xy(
geom,
as_wkb = TRUE,
as_iso = FALSE,
byte_order = "LSB",
quiet = FALSE
)
geom |
Either a raw vector of WKB or list of raw vectors, or a character vector containing one or more WKT strings. |
as_wkb |
Logical value, |
as_iso |
Logical value, |
byte_order |
Character string specifying the byte order when output is
WKB. One of |
quiet |
Logical value, |
A geometry as WKB raw vector or WKT string, or a list/character vector of
geometries as WKB/WKT with length equal to length(geom)
. NA
is returned
with a warning if WKB input cannot be converted into an OGR geometry object.
g <- "GEOMETRYCOLLECTION(POINT(1 2),
LINESTRING(1 2,2 3),
POLYGON((0 0,0 1,1 1,0 0)))"
g_swap_xy(g, as_wkb = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.