Including GIS data in SQL queries
You can include data in GIS layers in your SQL queries.
To include GIS data:
- Select the GIS layer in the GIS
Layer box.
The GIS layer must be loaded in the GeoPlan window. The layer is then referred to in the query as gislayer.
- Optionally, select the field in the GIS
Field box.
Tip: It is more flexible to use the syntax shown in the example below where the field name is included in the query - gislayer.STRUCTURE
- Choose the GIS Search Type.
The search types are described below.
Now you can use the GIS fields in the query in exactly the same way as network object fields
The example below uses GIS data to find damaged concrete pipes at least 300mm in diameter that lie within 2 metres of a minor road.
Sequence of operations
Note: If both GIS select options and object type select options are defined in the query, the GIS search is carried out first. The main query using object type criteria is then carried out on the results of the GIS search.
For example:
|
|
GIS search type and geometry
The combinations of geometry and search type listed in the table below are valid.
Notes:
- For ArcGIS, the "Inside" search type finds objects completely inside a GIS polygon.
- For MapX and MapXtreme, the "Inside" search type finds objects whose centre is inside a GIS polygon boundary.
- The "Cross" search type includes all objects "Inside" a GIS polygon and also those which intersect the boundary.
- The "Contains" search type looks for network polygons with GIS objects completely inside the network polygon.
GIS search type | Search type description | InfoWorks WS Pro geometry | GIS geometry |
---|---|---|---|
Cross |
Searches for network objects which intersect a GIS layer line or polygon area |
Line |
Line Polygon |
Polygon |
Line Polygon |
||
Inside |
Searches for network objects inside a GIS layer polygon |
Point |
Polygon |
Line |
Polygon |
||
Polygon |
Polygon |
||
Contains |
Searches for network polygons with GIS objects inside the polygon. |
Polygon |
Point Line Polygon |
Distance |
Searches for network objects within a Search Distance of a GIS layer line or polygon area |
Point |
Point Line Polygon |
Line |
Point Line Polygon |
||
Polygon |
Point Line Polygon |