% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatial_queries.R
\name{spatial_query}
\alias{spatial_query}
\title{Execute a spatial query}
\arguments{
\item{rdd}{A Sedona spatial RDD.}

\item{x}{The query object.}

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

\item{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
\code{org.locationtech.jts.geom.Geometry}.}
}
\description{
Given a spatial RDD, run a spatial query parameterized by a spatial object
\code{x}.
}
\keyword{internal}
