Learn R Programming

apache.sedona (version 1.7.2)

sedona_write_wkb: Write SpatialRDD into a file.

Description

Export serialized data from a Sedona SpatialRDD into a file.

  • sedona_write_wkb:

  • sedona_write_wkt:

  • sedona_write_geojson:

Usage

sedona_write_wkb(x, output_location)

sedona_write_wkt(x, output_location)

sedona_write_geojson(x, output_location)

Value

No return value.

Arguments

x

The SpatialRDD object.

output_location

Location of the output file.

See Also

Other Sedona RDD data interface functions: sedona_read_dsv_to_typed_rdd(), sedona_read_geojson(), sedona_read_shapefile_to_typed_rdd(), sedona_save_spatial_rdd()

Examples

Run this code
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_wkb(
    sc,
    location = input_location,
    wkb_col_idx = 0L
  )
  sedona_write_wkb(rdd, "/tmp/wkb_output.tsv")
}

Run the code above in your browser using DataLab