minimum_bounding_box: Find the minimal bounding box of a geometry.

Description Usage Arguments Value See Also Examples

View source: R/spatial_rdd.R

Description

Given a Sedona spatial RDD, find the axis-aligned minimal bounding box of the geometry represented by the RDD.

Usage

1

Arguments

x

A Sedona spatial RDD.

Value

A minimum bounding box object.

See Also

Other Spatial RDD aggregation routine: approx_count()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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_to_typed_rdd(
    sc,
    location = input_location, type = "polygon"
  )
  boundary <- minimum_bounding_box(rdd)
}

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