Used inCONFIG REQUEST
ServersImage Query Feature Extract ArcMap
A spatial filter defines the envelope for a spatial query. The envelope can be a rectangle, point, line, polygon, or buffer.
- One ENVELOPE, POLYLINE, POLYGON, or MULTIPOINT element is required. Only one of these elements can be used.
- Using MULTIPOINT as a filter against a point or line layer will yield no results. Instead, a small envelope should be generated around this point. The envelope can then be used as the filter. Similarly, POLYLINE used against a point will yield no results. If desired, an envelope can be generated around the line for use as a filter.
- When using relation="envelope_intersection" on ArcSDE layers, no features are returned when
The reason is that all points and some lines do not have an associated envelope and hence cannot be used to query features using "envelope_intersection". Use relation="area_intersection" instead.
- When "area_intersection" is used with relation, all features that partially or fully fall within the area of the filter are selected. This operation can take some time. To speed up processing, "envelope_intersection" can be used instead. This method checks to see if the bounding box of the filter overlaps any bounding boxes of the features in the layer. A much quicker search results, but the features found could fall outside the area of the filter. In the examples below, an oval shape is used as the filter. When "envelope_intersection" is used, features outside the filter can be selected even though they are far outside the filter.
Shape of spatial filter to select points
Points selected when relation="area_intersection"
Points selected when relation="envelope_intersection"
Shape of spatial filter to select polygons
No polygons are selected when relation="area_intersection"
Polygon is selected when relation="envelope_intersection"
In general, it is recommended to use "area_intersection" to be certain you are retrieving the correct features. The value "envelope_intersection" should only be used in customized environments where you plan to retrieve a subset of features on which to run a second query using "area_intersection".
Attribute Descriptions for SPATIALFILTER
Back to top
|relation||Describes spatial relation. It is recommended to use "area_intersection". See Notes section for more details.|
Examples for SPATIALFILTER Example 1: Note in this example that the DATASET fromlayer is "Countries". This refers to the LAYER id in the map configuration file, not the LAYER name.
Back to top
|<?xml version="1.0" encoding="UTF-8"?>|
<ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" />
<IMAGESIZE width="643" height="502" />
<LAYER type="featureclass" name="select layer" visible="true" id="300">
<DATASET fromlayer="Countries" />
<ENVELOPE maxy="30" maxx="30" miny="0" minx="0" />
<SIMPLEPOLYGONSYMBOL fillcolor="255,255,255" filltype="cross" />