Feature Description
Spatial query constructs filters through spatial relationships between geometries to retrieve objects that meet criteria from existing data, while supporting query distance settings. Currently supports spatial queries for points, lines, and polygons.
The Spatial Query function becomes available when non-empty point, line, polygon, text, or CAD datasets exist in the current map.
Search objects can also be selected from the map after opening the spatial query dialog.
Feature Entry
- Menu bar: Spatial Analysis tab > Query->Spatial Query button.
Steps
- Set spatial query type for layers to be queried.
- Select Spatial Query to query sub-objects across entire datasets.
- Select Spatial Attribute Query to query sub-objects meeting Attribute Query Conditions.
- Select target layer for search results and configure Spatial Query Mode and Attribute Query Condition.
- Spatial Query Mode: Click the dropdown in the Spatial Query Mode column to select from system-supported spatial query tools. Selected tools will be illustrated and explained in the Tool Description area. Eight spatial query tools are currently supported. See Spatial Query Basic Operators.
- Attribute Query Condition: Click the ... button to open the SQL Expression dialog for building property field query conditions. Example: To find cities with population >1 million along a river, set "POPULATION > 1000000". Leave empty to return all objects meeting spatial criteria. Note: Available only when Spatial Attribute Query is selected.
- Configure query layer.
Query Distance Setting Schematic Note: Some spatial query conditions don't support distance settings. Legend: √=Supported; ×=Unsupported; --=Not applicable.
Query Object Target Object Cross Contain Contained Overlap Disjoint Adjacent Coincide Intersect Point Point -- √ × -- √ -- × √ Line -- -- × -- √ × -- √ Polygon -- -- √ -- √ × √ √ Line Point -- √ -- -- √ × -- √ Line × √ × × √ × × √ Polygon × -- √ -- √ × -- √ Polygon Point -- √ -- -- √ × -- √ Line -- √ -- -- √ × -- √ Polygon -- √ √ √ √ × × √ - All Objects:
- Perform spatial query only on selected objects: When objects are selected, auto-updates to "perform spatial query only on selected objects (1 selected)" with count in parentheses.
- Expression:
- Query Distance: Check to set buffer radius and unit. Objects will be queried within buffer zones. Example: Find residential areas within 30m of a road without manual buffer creation.
- Configure result display.
- Browse Attribute Table: Show results in attribute window.
- Highlight in Map: Visually emphasize results.
- Save Results: Export results to datasets.
Application Example
To identify residential areas within 30m of a road for expansion: Select the road as query object, set residential polygon dataset as target, use Line-Polygon Intersect condition with 30m query distance. Results shown in blue:
![]() |
Notes
- Supports spatial queries on maps with dynamic projection - projects query objects to target layer's coordinate system.
- Search objects must be selected before setting query conditions, otherwise "Please specify search object" appears.
- When querying CAD datasets (containing mixed geometries), all spatial query tools for point/line/polygon queries are available.
Related Topics