sedona_read_shapefile {apache.sedona}R Documentation

Create a SpatialRDD from a shapefile data source.

Description

Create a generic SpatialRDD from a shapefile data source.

Usage

sedona_read_shapefile(sc, location, storage_level = "MEMORY_ONLY")

Arguments

sc

A spark_connection.

location

Location of the data source.

storage_level

Storage level of the RDD (default: MEMORY_ONLY).

Value

A SpatialRDD.

See Also

Other Sedona data inferface functions: sedona_read_dsv_to_typed_rdd(), sedona_read_geojson_to_typed_rdd(), sedona_read_geojson(), sedona_read_shapefile_to_typed_rdd(), sedona_read_wkb(), sedona_read_wkt(), sedona_save_spatial_rdd(), sedona_write_geojson(), sedona_write_wkb(), sedona_write_wkt()

Examples

library(sparklyr)
library(apache.sedona)

sc <- spark_connect(master = "spark://HOST:PORT")

if (!inherits(sc, "test_connection")) {
  input_location <- "/dev/null" # replace it with the path to your input file
  rdd <- sedona_read_shapefile(sc, location = input_location)
}


[Package apache.sedona version 1.1.1 Index]