Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Box intersects of C2DM should not check M values #166

Open
bauwelp-awv opened this issue Nov 21, 2023 · 1 comment
Open

Box intersects of C2DM should not check M values #166

bauwelp-awv opened this issue Nov 21, 2023 · 1 comment

Comments

@bauwelp-awv
Copy link

for(int i = 0; i < getCoordinateDimension(); i++){

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

@maesenka
Copy link
Member

maesenka commented Dec 6, 2023

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants