public class BBOXTests extends QueryFilterFixture
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 Details

  • Constructor Details

    • BBOXTests

      public BBOXTests()
  • Method Details

    • createGeometryBaseType

      @BeforeClass public void createGeometryBaseType()
      Creates an XSTypeDefinition object representing the gml:AbstractGeometryType definition.
    • nonSpecificBBOX

      public void nonSpecificBBOX(ProtocolBinding binding, QName featureType)
      [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

      public void bboxWithDefaultExtent(ProtocolBinding binding, QName featureType)
      [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

      public Document envelopeAsGML(org.opengis.geometry.Envelope extent)
      Work around for ExtentsenvelopeAsGML(Envelope) only using 2 decimals
      Parameters:
      extent - the envelope
      Returns:
      the envelope as GML
    • invalidGeometryOperand

      public void invalidGeometryOperand(QName featureType)
      [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 code InvalidParameterValue.
      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

      Element surfaceToPolygon(Element geometry)
      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

      void addBBOXPredicate(Document request, Element envelope, Element valueRef)
      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 is null, the predicate applies to all spatial properties.