wiki-archive/twiki/data/TAPIR/SpatialOperators.txt

66 lines
2.7 KiB
Plaintext

---+ Spatial Operators
See the OpenGIS document on filters at http://www.opengis.org/docs/02-059.pdf for an introduction.
OpenGIS implements the following kind of spatial operators (SOPs):
* Equals (ogc:BinarySpatialOpType)
* Disjoint (ogc:BinarySpatialOpType)
* Touches (ogc:BinarySpatialOpType)
* Within (ogc:BinarySpatialOpType)
* Overlaps (ogc:BinarySpatialOpType)
* Crosses (ogc:BinarySpatialOpType)
* Intersects (ogc:BinarySpatialOpType)
* Contains (ogc:BinarySpatialOpType)
* DWithin (ogc:DistanceBufferType)
* Beyond (ogc:DistanceBufferType)
* BBOX (ogc:BBOXType)
with the following type definitions:
<verbatim>
<xsd:complexTypename="BinarySpatialOpType">
<xsd:complexContent>
<xsd:extensionbase="ogc:SpatialOpsType">
<xsd:sequence>
<xsd:elementref="ogc:PropertyName"/>
<xsd:choice>
<xsd:elementref="gml:_Geometry"/>
<xsd:elementref="gml:Box"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexTypename="BBOXType">
<xsd:complexContent>
<xsd:extensionbase="ogc:SpatialOpsType">
<xsd:sequence>
<xsd:elementref="ogc:PropertyName"/>
<xsd:elementref="gml:Box"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexTypename="DistanceBufferType">
<xsd:complexContent>
<xsd:extensionbase="ogc:SpatialOpsType">
<xsd:sequence>
<xsd:elementref="ogc:PropertyName"/>
<xsd:elementref="gml:_Geometry"/>
<xsd:elementname="Distance" type="ogc:DistanceType"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexTypename="DistanceType" mixed="true">
<xsd:attributename="units" type="xsd:anyURI" use="required"/>
</xsd:complexType>
</verbatim>
The Bounding Box (BBOX) is a set of four comma-separated decimal, scientific notation, or integer values (if integers are provided where floating point is needed, the decimal point is assumed at the end of the number). These values specify the minimum X, minimum Y, maximum X, and maximum Y ranges, in that order, expressed in units of the SRS of the feature type(s) begin queried. The four bounding box values indicate the outside edges of a rectangle, as in Figure 5; minimum X is the left edge, maximum X the right, minimum Y the bottom, and maximum Y the top.
To implement all of the SOPs given by the OpenGIS would be a lot of work to implement software for.
But it might be worthwile to implement some of it in the protocol and to give a provider the chance to indicate whether he supports SOPs in the CapabilitiesRequest.