Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The goal is to enable a geoserver WFS request with a 3D bounding box so that we receive only geometries not disjoint with that 3D bounding box.
In other words, there is a min and max for the third coordinate as well as the first two.

In 2D we have in KVP:
BBOX=x0,y0,x1,y1

However, in 3D we get:
BBOX=x0,y0,z0,x1,y1,z1

Only 3d geometries that qualify for the min and max pairs for all three axes are returned.

Furthermore, OGC filters in POST requests will also support 3D BoundingBoxes, as for example:

<ogc:Filter>"
 <ogc:BBOX>"
  <gml:Envelope srsName=\"EPSG:4979\">
    <gml:lowerCorner>-200 -200 0 </gml:lowerCorner>
    <gml:upperCorner> 200 200 50 </gml:upperCorner>
   </gml:Envelope>
 </ogc:BBOX>
</ogc:Filter>

In order to accomplish this, Geotools must support

  • 3D Envelopes: a 3D envelope geometry class and a 3D referenced envelope geometry class.
  • 3D Bounding Boxes: a 3D Bounding Box has two additional attributes (min z and max z) and filters geometries using all three dimensions.

...

  • BBOX3D, for the 3D bbox filter, subinterface of BBOX
  • BoundingBox3D, a subinterface of BoundingBox specifying bounding box coordinates

Furthermore, the existing BBOX as well as BBOX3D will support a new method BoundingBox getBounds() which returns a BoundingBox object representing the boundaries of the filter (BoundingBox3D if it is a BBOX3D).

There will be the following new classes in main

  • BBOX3DImpl, implementation of filter interface
  • ReferencedEnvelope3D, Extension of ReferencedEnvelope3D, extends JTS Envelope methods to use 3D coordinates and provides referenced envelope support for 3D coordinates

Furthermore, the The FIlterFactory interfaces will be extended with the following methods:

  • BBOX3D  bbox(String propertyName, BoundingBox3D bbox);
  • BBOX3D  bbox( Expression geometry, BoundingBox3D bbox);
  • BBOX3D  bbox( Expression geometry, BoundingBox3D bbox, MatchAction matchAction);

Furthermore, the implementation of the existing bbox( ..., BoundingBox bbox) methods will be extended to automatically call the 3D methods if the supplied BoundingBox is in fact a BoundingBox3D.

 

The existence of BBOX3D filter has implications for FilterVisitors. Although the APi does not change, the visitor method bbox must support BBOX3D if it wants to regenerate the filter without loosing information.

Because of the generic bbox( ..., BoundingBox bbox) and getBounds() methods it is possible to copy a BBOX filter in a generic way (see last example below).

These implications must all be documented.

Filter

BEFORE:

Code Block
Envelope env = new ReferencedEnvelope(minx, maxx, miny, maxy, crs)



BBOX filter = filterfac.bbox(propertyName, minx, miny, minz, maxx, maxy, maxz, srs);
boolean result = filter.eval(geom);


BBOX otherFilter = ...
BBOX filter = filterfac.bbox(propertyName, otherfilter.getMinX(), ... , srs); 

AFTER:

Code Block
BoundingBox3D env = public ReferencedEnvelope3D(x1, x2, y1, y2, z1, z2, crs)
BBOX3D filter = filterfac.bbox(propertyName, env);
boolean result = filter.eval(geom);

BBOX otherFilter = ...
BBOX filter = filterfac.bbox(propertyName, otherfilter.getBounds());

Documentation Changes

list the pages effected by this proposal

...