Given a spatial RDD, run a spatial query parameterized by a spatial object
x.
A Sedona spatial RDD.
The query object.
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".
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.