Spatial Query

Instructions for use

Spatial Query refers to constructing a Filter based on the spatial position relationship between Geometries, and querying the objects satisfying the Filter from the existing data. It also supports the Set Query Distance: for the query object. At present, the Spatial Query function of point, line and Region is supported.

Function entrance

  • Menu bar: Spatial Analysis tab > Query-> Spatial Query button.

The Spatial Query button is available as long as there are non-empty points, lines, faces, texts, CAD Datasets in the current Map. When the Spatial Query dialog box opens, you can also choose to search for objects in the Map.

Operating instructions

  1. Query Type: Sets the Spatial Query type of the Layers for Query.
    • Select Spatial Query to query the sub-objects of the entire Dataset when executing the Spatial Query.
    • Select Spatial Attribute Query to execute a Spatial Query with a Query Data set matching Attribute Query Condition subobjects.
  2. Layers for Query: Select a layer to return the Search Result, and set Spatial Query Mode and Attribute Query Condition.
    • Spatial Query Mode: Click the Spatial Query Mode Drop-down Button and select a supported Spatial Query operator from the drop-down list. When a Spatial Query operator is selected, the Operator Description area illustrates and explains the selected operator. Currently, Application supports 8 kinds of Spatial Query operators. Please refer to the Spatial Query basic operator for details.
    • Attribute Query Condition: Click the .. command in the Attribute Query Condition column to pop up the SQL Expression dialog box. Construct the Property FieldQuery Conditions of Layers for Query. For example, if you want to query a city where a river flows and the population is greater than 1 million, you can set the population field of the city in SQL Expression & 1000000. This item can be left blank, and the Search Result of the corresponding layer is all objects that meet the Spatial Query Condition. Note: If you select the Spatial Attribute Query type in the previous step, the Attribute Query Condition function can be displayed and set.
  3. Query Layer: Set Query Layer.
    • All Objects
    • Perform spa tial query only on selected objects: if one or more objects of Query Layer are selected in Map, The program will automatically select Perform spatial query only on selected objects, and the data in brackets will change with the selected Object Count. Here is an example of selecting an object.
    • Expression:
    • Query Distance: Check the Query Distance check box to Set Query Distance: and the unit. The query object will perform Buffer Zone Analysis according to the specified radius, and then query the area containing the buffer range. For example, if you want to query the residential area within 30m of a road, the Set Query Distance: is 30m, which simplifies the user's regular operation of first analyzing and then querying.
    • : Diagram
      Set Query Distance

      Note: Part of Spatial Query Condition is not valid for Set Query Distance:. The following table shows whether each Query Condition supports Set Query Distance: Detail Description: indicates that Set Query Distance: is supported; × indicates that Set Query Distance: is not valid; -- indicates an unsupported query operator.

      Query object Queried object Intersection Contain Be contained Overlap Separation Adjacent Coincidence Intersect
      dot Point -- × -- -- ×
      Line -- -- × -- × --
      Face -- -- -- ×
      line Point -- -- -- × --
      Line × × × × ×
      Face × -- -- × --
      Face Point -- -- -- × --
      Line -- -- -- × --
      Face -- × ×
  4. Show Results
    • Browse Attribute Table: Select this check box to query Show Results in the attribute window of Map after the Spatial Query is completed.
    • Highlight in Map: Select this check box to Highlight in Map.
    • Save Results: Select this check box to Search ResultSave to Dataset.

Application example

For the expansion of a road, it is necessary to find out the residential areas to be demolished within 30m on both sides of the road. Select the road to be expanded as the query object, the residential area surface Dataset settings as the queried object, the Spatial Query Condition as Intersection _ Line _ Surface, and the Set Query Distance as 30m. The Search Result is the intersected face object (blue box) within the query range, as shown in the following figure.

Remark

  1. Spatial Query can be performed on the map with Dynamic Projection enabled. The query object can be projected onto the Target Layer for query. The coordinate system of Result Dataset is consistent with that of Target Layer.
  2. Layer Settings Spatial Query Condition can be searched only when the search object is selected, otherwise Prompt "Please specify the search object" will appear in the Output Window.
  3. When the searched layer performs Spatial Query for CAD Dataset (CAD Dataset is a kind of CAD, which may include Geometry such as point, line, surface, etc.), the optional operator in Spatial Query Condition includes the search object and point, line, All operators supported by Region Dataset for Spatial Query.

Related topics