Description Usage Arguments Examples
View source: R/data_interface.R
Create a typed SpatialRDD (namely, a PointRDD, a PolygonRDD, or a LineStringRDD) from a shapefile data source.
1 2 3 4 5 6 | sedona_read_shapefile_to_typed_rdd(
sc,
location,
type = c("point", "polygon", "linestring"),
storage_level = "MEMORY_ONLY"
)
|
sc |
A |
location |
Location of the data source. |
type |
Type of the SpatialRDD (must be one of "point", "polygon", or "linestring". |
storage_level |
Storage level of the RDD (default: MEMORY_ONLY). |
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(sparklyr)
library(sparklyr.sedona)
sc <- spark_connect(master = "spark://HOST:PORT")
if (!inherits(sc, "test_connection")) {
input_location <- system.file(
file.path("extdata", "shapefile-example"), package = "sparklyr.sedona"
)
rdd <- sedona_read_shapefile_to_typed_rdd(
sc, location = input_location, type = "polygon"
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.