geolatte-geom
geolatte-geom copied to clipboard
Box intersects of C2DM should not check M values
https://github.com/GeoLatte/geolatte-geom/blob/b3760323db5fef510b5ef8125904a78ce413f573/geom/src/main/java/org/geolatte/geom/Box.java#L223
The Box.intersects (and other) method uses getCoordinateDimension() to compare all coordinates.
For a C2DM this dimension is 3. This means that also M values are used in the comparison, which in my opinion is wrong.
Regards,
Philip Van Bauwel
It's not per se wrong. It makes sense to treat the M-coordinate just like any other coordinate.
It's just that in many use cases we want the intersects() (or other operation) in 2D.
I propose we add this as a separate class (comparable to ProjectedGeometryOperations
). So we can have something like Box2DOps.intersects(b1, b2)
.