Class BBOXTests
java.lang.Object
org.opengis.cite.iso19142.BaseFixture
org.opengis.cite.iso19142.basic.filter.QueryFilterFixture
org.opengis.cite.iso19142.basic.filter.spatial.BBOXTests
Tests the response to a GetFeature request that includes a BBOX predicate. All
conforming "Basic WFS" implementations must support this spatial operator.
Sources
- OGC 09-025r2, Table 1: Conformance classes
- OGC 09-026r2, cl. A.7: Test cases for minimum spatial filter
-
Field Summary
FieldsFields inherited from class org.opengis.cite.iso19142.basic.filter.QueryFilterFixture
dataSampler, GET_FEATURE_MINIMAL, model, temporalPropertiesFields inherited from class org.opengis.cite.iso19142.BaseFixture
docBuilder, ETS_PKG, featureInfo, featureTypes, reqEntity, rspEntity, supportedBindings, TNS_PREFIX, wfsClient, wfsMetadata, wfsVersion -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddBBOXPredicate(Document request, Element envelope, Element valueRef) Adds a BBOX spatial predicate to a GetFeature request entity.voidbboxWithDefaultExtent(ProtocolBinding binding, QName featureType) [Test] Submits a GetFeature request with a BBOX predicate referring to a valid geometry property.voidCreates an XSTypeDefinition object representing the gml:AbstractGeometryType definition.envelopeAsGML(org.opengis.geometry.Envelope extent) Work around for ExtentsenvelopeAsGML(Envelope)only using 2 decimalsvoidinvalidGeometryOperand(QName featureType) [Test] Submits a GetFeature request where the BBOX predicate refers to a feature property (gml:description) that is not geometry-valued.voidnonSpecificBBOX(ProtocolBinding binding, QName featureType) [Test] Submits a GetFeature request with a non-specific BBOX predicate.(package private) ElementsurfaceToPolygon(Element geometry) Replaces gml:Surface elements having a single gml:PolygonPatch with a gml:Polygon element.Methods inherited from class org.opengis.cite.iso19142.basic.filter.QueryFilterFixture
buildRequestEntity, discardResponseEntity, findTemporalProperties, getModel, initQueryFilterFixtureMethods inherited from class org.opengis.cite.iso19142.BaseFixture
addAttributesOnTestFailure, allProtocolsAndFeatureTypes, bindingAndAvailFeatureTypeProductSet, extractBodyAsDocument, getFeatureTypes, getInstantiatedFeatureTypes, getProtocolBindings, initBaseFixture, initParser, setWfsClient
-
Field Details
-
ENVELOPE_EXPANSION
public static final double ENVELOPE_EXPANSION- See Also:
-
-
Constructor Details
-
BBOXTests
public BBOXTests()
-
-
Method Details
-
createGeometryBaseType
@BeforeClass public void createGeometryBaseType()Creates an XSTypeDefinition object representing the gml:AbstractGeometryType definition. -
nonSpecificBBOX
[Test] Submits a GetFeature request with a non-specific BBOX predicate. If no value reference is specified the predicate is applied to all spatial properties. The response entity (wfs:FeatureCollection) must be schema-valid and contain only instances of the requested type that satisfy the spatial predicate.- Parameters:
binding- The ProtocolBinding to use for this request.featureType- A QName representing the qualified name of some feature type.- See Also:
-
- "ISO 19143:2010, 7.8.3.2: BBOX operator"
-
bboxWithDefaultExtent
[Test] Submits a GetFeature request with a BBOX predicate referring to a valid geometry property. The response shall contain only features possessing a geometry value that spatially interacts (i.e. is not disjoint) with the given envelope.Sources
- ISO 19143:2010, cl. A.7: Test cases for minimum spatial filter
- ISO 19143:2010, 7.8.3.2: BBOX operator
- Parameters:
binding- The ProtocolBinding to use for this request.featureType- A QName representing the qualified name of some feature type.
-
envelopeAsGML
Work around for ExtentsenvelopeAsGML(Envelope)only using 2 decimals- Parameters:
extent- the envelope- Returns:
- the envelope as GML
-
invalidGeometryOperand
[Test] Submits a GetFeature request where the BBOX predicate refers to a feature property (gml:description) that is not geometry-valued. An exception is expected in response with status code 400 and exception codeInvalidParameterValue.- Parameters:
featureType- A QName representing the qualified name of a feature type for which instances exist.- See Also:
-
- "ISO 19142:2010, 11.4: GetFeature - Exceptions"
- "ISO 19143:2010, 8.3: Exceptions"
-
surfaceToPolygon
Replaces gml:Surface elements having a single gml:PolygonPatch with a gml:Polygon element. Such a simplification facilitates a binding to JTS geometry objects.- Parameters:
geometry- A GML geometry collection.- Returns:
- A new DOM Element containing a simplified representation of the original geometry collection.
- See Also:
-
- "ISO 19125-1: Geographic information -- Simple feature access -- Part 1: Common architecture"
-
addBBOXPredicate
Adds a BBOX spatial predicate to a GetFeature request entity. If the envelope has no spatial reference (srsName) it is assumed to be the default CRS specified in the capabilities document.- Parameters:
request- The request entity (/wfs:GetFeature).envelope- A DOM Element representing a gml:Envelope.valueRef- An Element (fes:ValueReference) that specifies the spatial property to check. If it isnull, the predicate applies to all spatial properties.
-