sedona_write_wkt: Write SpatialRDD into a WKT file.

Description Usage Arguments Value See Also Examples

View source: R/data_interface.R

Description

Export serialized data from a Sedona SpatialRDD into a WKT file.

Usage

1
sedona_write_wkt(x, output_location)

Arguments

x

The SpatialRDD object.

output_location

Location of the output file.

Value

No return value.

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_shapefile(), sedona_read_wkb(), sedona_read_wkt(), sedona_save_spatial_rdd(), sedona_write_geojson(), sedona_write_wkb()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(sparklyr)
library(apache.sedona)

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

if (!inherits(sc, "test_connection")) {
  input_location <- "/dev/null" # replace it with the path to your input file
  rdd <- sedona_read_wkt(
    sc,
    location = input_location,
    wkt_col_idx = 0L
  )
  sedona_write_wkt(rdd, "/tmp/wkt_output.tsv")
}

apache.sedona documentation built on Oct. 11, 2021, 9:06 a.m.