Package org.opengis.cite.iso19142.joins
Class SpatialJoinTests
java.lang.Object
org.opengis.cite.iso19142.BaseFixture
org.opengis.cite.iso19142.basic.filter.QueryFilterFixture
org.opengis.cite.iso19142.joins.SpatialJoinTests
A spatial join includes a spatial predicate. One or more of the following spatial
predicates must be supported:
- Equals
- Disjoint
- Intersects
- Touches
- Crosses
- Within
- Contains
- Overlaps
- Beyond
- DWithin
A sample GetFeature request entity is shown below, where the "Intersects" predicate refers to the geometry properties of two different feature types.
<wfs:GetFeature version="2.0.0" service="WFS" xmlns:tns="http://example.org/ns1" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0"> <wfs:Query typeNames="tns:Parks tns:Lakes"> <fes:Filter> <fes:Intersects> <fes:ValueReference>tns:Parks/tns:geometry</fes:ValueReference> <fes:ValueReference>tns:Lakes/tns:geometry</fes:ValueReference> </fes:Intersects> </fes:Filter> </wfs:Query> </wfs:GetFeature>
Sources
- OGC 09-025r2, 7.9.2.5.3: Join processing
- OGC 09-025r2, A.1.12: Spatial joins
- OGC 09-026r2, A.8: Test cases for spatial filter
-
Field Summary
Fields inherited from class org.opengis.cite.iso19142.basic.filter.QueryFilterFixture
dataSampler, GET_FEATURE_MINIMAL, model, temporalProperties
Fields inherited from class org.opengis.cite.iso19142.BaseFixture
docBuilder, ETS_PKG, featureInfo, featureTypes, reqEntity, rspEntity, supportedBindings, TNS_PREFIX, wfsClient, wfsMetadata, wfsVersion
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindGeometryProperties
(String gmlTypeName) Searches the application schema for geometry properties where the value is an instance of the given type.void
implementsSpatialJoins
(org.testng.ITestContext testContext) Checks the value of the service constraint "ImplementsSpatialJoins" in the capabilities document.void
Initializes the test class fixture.void
[Test
] Submits a basic join query that includes theIntersects
operator.void
Methods inherited from class org.opengis.cite.iso19142.basic.filter.QueryFilterFixture
buildRequestEntity, discardResponseEntity, findTemporalProperties, getModel, initQueryFilterFixture
Methods inherited from class org.opengis.cite.iso19142.BaseFixture
addAttributesOnTestFailure, allProtocolsAndFeatureTypes, bindingAndAvailFeatureTypeProductSet, extractBodyAsDocument, getFeatureTypes, getInstantiatedFeatureTypes, getProtocolBindings, initBaseFixture, initParser, setWfsClient
-
Field Details
-
IMPL_SPATIAL_JOINS
- See Also:
-
-
Constructor Details
-
SpatialJoinTests
public SpatialJoinTests()
-
-
Method Details
-
findGeometryProperties
Map<QName,List<org.apache.xerces.xs.XSElementDeclaration>> findGeometryProperties(String gmlTypeName) Searches the application schema for geometry properties where the value is an instance of the given type.- Parameters:
gmlTypeName
- The name of a GML geometry type (may be abstract).- Returns:
- A Map containing, for each feature type name (key), a list of matching geometry properties (value).
-
implementsSpatialJoins
@BeforeTest public void implementsSpatialJoins(org.testng.ITestContext testContext) Checks the value of the service constraint "ImplementsSpatialJoins" in the capabilities document. All tests are skipped if this is not "TRUE".- Parameters:
testContext
- Information about the test run environment.
-
initFixture
@BeforeClass public void initFixture()Initializes the test class fixture. Finds surface, curve, and point properties defined in the application schema. Properties that use primitive types are preferred, but if none are defined then aggregate geometry types (Multi*) will be used instead. -
joinWithIntersects
public void joinWithIntersects()[Test
] Submits a basic join query that includes theIntersects
operator. A projection clause (wfs:PropertyName) is omitted, so the response entity is expected to contain instances of both feature types. -
selfJoinWithIntersects
public void selfJoinWithIntersects()
-