Description Usage Arguments Examples
Transform data within a spatial RDD from one coordinate reference system to another.
1 | crs_transform(x, src_epsg_crs_code, dst_epsg_crs_code, strict = FALSE)
|
x |
The spatial RDD to be processed. |
src_epsg_crs_code |
Coordinate reference system to transform from (e.g., "epsg:4326", "epsg:3857", etc). |
dst_epsg_crs_code |
Coordinate reference system to transform to. (e.g., "epsg:4326", "epsg:3857", etc). |
strict |
If FALSE (default), then ignore the "Bursa-Wolf Parameters Required" error. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(sparklyr)
library(sparklyr.sedona)
sc <- spark_connect(master = "spark://HOST:PORT")
if (!inherits(sc, "test_connection")) {
input_location <- system.file(
file.path("extdata", "polygon.json"), package = "sparklyr.sedona"
)
rdd <- sedona_read_geojson_to_typed_rdd(
sc, location = input_location, type = "polygon"
)
crs_transform(
rdd, src_epsg_crs_code = "epsg:4326", dst_epsg_crs_code = "epsg:3857"
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.