Opened 9 years ago
Closed 8 years ago
#9941 closed Feature Requests (fixed)
bg::touches() for box geometries
Reported by: | Frank | Owned by: | Barend Gehrels |
---|---|---|---|
Milestone: | To Be Determined | Component: | geometry |
Version: | Boost 1.55.0 | Severity: | Not Applicable |
Keywords: | touches, box | Cc: | mateusz@… |
Description
Hello,
the bg::touches() algorithm is not implemented for box geometries. Corresponding documentation or - better - implementation would be nice!
Discussion can be found under: http://boost-geometry.203548.n3.nabble.com/touches-compile-error-tp4025154.html
Change History (4)
comment:1 by , 9 years ago
comment:2 by , 8 years ago
Cc: | added |
---|
comment:3 by , 8 years ago
I pushed the implementation to the develop. However there is an edge case when both Boxes are Point-sized, e.g.: box(pt(0 0,0 0), pt(0 0,0 0)).
Spatial relations are well defined, e.g. touches() returns TRUE only if the interiors of both geometries do NOT overlap.
In the case of Polygons we know what to do because according to the OGC the Polygon must have an interior, its area can't be 0. Boxes are different, they're not defined in the OGC standard. Bounding objects in general may have no area/volume since they may be an envelop of a single Point. So we should decide how a Point-sized Box should be treated:
- as a Point - no boundary, only the interior which means that touches for equal Point-sized Boxes should return FALSE.
- as an Areal geometry without interior, only boundary which means that touches for equal Point-sized Boxes should return TRUE (currently this is implemented).
In general the handling of numerical errors is different for Box/Box cases, that is, currently in all functions the error is not taken into account. It's because the test should be as simple as possible. However this way the algorithm calculating some spatial relation for Geometries may be not compatible with the algorithm calculating it for bounding Boxes of those Geometries.
comment:4 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Added in 1.56 with the above remarks.
It is documented - sorry for the confusion!