spatial_query {apache.sedona}R Documentation

Execute a spatial query

Description

Given a spatial RDD, run a spatial query parameterized by a spatial object x.

Arguments

rdd

A Sedona spatial RDD.

x

The query object.

index_type

Index to use to facilitate the KNN query. If NULL, then do not build any additional spatial index on top of x. Supported index types are "quadtree" and "rtree".

result_type

Type of result to return. If "rdd" (default), then the k nearest objects will be returned in a Sedona spatial RDD. If "sdf", then a Spark dataframe containing the k nearest objects will be returned. If "raw", then a list of k nearest objects will be returned. Each element within this list will be a JVM object of type org.locationtech.jts.geom.Geometry.


[Package apache.sedona version 1.1.1 Index]