> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

WherobotsDB supports SQL/MM Part3 Spatial SQL Standard. It includes four kinds of SQL operators as follows. All these operators can be directly called through:

```scala theme={"system"}
var myDataFrame = sedona.sql("YOUR_SQL")
```

Alternatively, `expr` and `selectExpr` can be used:

```scala theme={"system"}
myDataFrame.withColumn("geometry", expr("ST_*")).selectExpr("ST_*")
```

* **Constructor: Construct a Geometry given an input string or coordinates**
  * Example: ST\_GeomFromWKT (string). Create a Geometry from a WKT String.
  * Documentation: [Here](/reference/wherobots-db/geometry-data/geometry-functions/)
* **Function: Execute a function on the given column or columns**
  * Example: ST\_Distance (A, B). Given two Geometry A and B, return the Euclidean distance of A and B.
  * Documentation: [Here](/reference/wherobots-db/geometry-data/geometry-functions/)
* **Aggregate function: Return the aggregated value on the given column**
  * Example: ST\_Envelope\_Aggr (Geometry column). Given a Geometry column, calculate the entire envelope boundary of this column.
  * Documentation: [Here](/reference/wherobots-db/geometry-data/geometry-functions/)
* **Predicate: Execute a logic judgement on the given columns and return true or false**
  * Example: ST\_Contains (A, B). Check if A fully contains B. Return "True" if yes, else return "False".
  * Documentation: [Here](/reference/wherobots-db/geometry-data/geometry-functions/)
* **Nearest-Neighbor search: Identifying the k-nearest neighbors for a given spatial point or region based on geographic proximity**
  * Example: ST\_KNN(R: Table, S: Table, k: Integer, use\_spheroid: Boolean). Join operation to find the k-nearest neighbors of a point or region in a spatial dataset.
  * Documentation: [Here](/reference/wherobots-db/geometry-data/nearest-neighbour-searching/)

WherobotsDB supports SparkSQL query optimizer, documentation is [Here](/reference/wherobots-db/geometry-data/optimizer)
