# Spatial Queries

![](/files/eaKdgxZsDXRpUx0S4l6M) Spatial queries are used to search for map elements of a layer that meet a spatial criterion. Several types of spatial criteria are available, but each uses a reference selection as a basis for the search.&#x20;

Therefore, before performing the spatial query, it is essential that you select the reference elements.

Some examples of spatial queries:

* Select properties located at less than 500 meters from the selected park.
* Select route segments located within the selected zoning polygon.
* Select all lots adjacent to the selected river.

<figure><img src="/files/DwZZfBqVfRLMocQggHEg" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th width="85"></th><th></th></tr></thead><tbody><tr><td><strong>1</strong></td><td>Select the information layer on which the search is performed (what you are looking for). <br>The spatial query can only be performed on a selection that has been made beforehand.</td></tr><tr><td><strong>2</strong></td><td>Press the <strong>Options</strong> button to display a list of search options. The following options are available: <br><strong>Search only in current extent</strong>: The search is performed only on the area that appears on the screen. <br><strong>Search only in current selection</strong>: The search is performed only among the elements that are already selected. <br><strong>Add to current selection</strong>: The results of the query will be added to the elements on the map that have already been selected. <br><strong>Show result list</strong>: Displays the results list in the elements explorer. <br><strong>Always show selection</strong>: Displays results, even when these do not fall within the visibility thresholds of the layers that are queried (this is useful when results span a very large territory). <br><strong>Add labels on selected elements</strong>: Displays a label on each element that is found (improves visibility of results).</td></tr><tr><td><strong>3</strong></td><td>Choose the spatial criteria to apply for the query.</td></tr><tr><td><strong>4</strong></td><td>Press <strong>Search</strong> to launch the query.</td></tr></tbody></table>

Results are selected on the map. If the **Show result list** option is selected, the [elements explorer](/en2/applications-user/jmap-pro-user-guide/map-layers/elements-explorer.md) displays the elements returned by the query. It is then possible to launch an information report pertaining to the selection (refer to [Information Report](/en2/applications-user/jmap-pro-user-guide/tools/information-tools/information-report.md)).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.k2geospatial.com/en2/applications-user/jmap-pro-user-guide/tools/search-tools/spatial-queries.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
