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

Issue with RayCrossingCounter and coordinates with Measures #581

Closed
mukoki opened this issue Aug 15, 2020 · 3 comments
Closed

Issue with RayCrossingCounter and coordinates with Measures #581

mukoki opened this issue Aug 15, 2020 · 3 comments

Comments

@mukoki
Copy link
Contributor

mukoki commented Aug 15, 2020

Some algo may fail with coordinates with measures.
For example, with RayCrossingCounter.locatePointInRing(coord, coordSequence)
If CoordinateSequence is
dim = 4, measures = 0 (see previous bug report) : OK
dim = 4, measures = 1 (normal XYZM coordinate) : throws exception at ring.getCoordinate(i, p1)

Problem is that RayCrossingCounter.locatePointInRing tries to set the M of the XYZM coordinate to a default 3D Coordinate without M initialized in the method. I suppose XYM coordinates has the same problem in this case.

@dr-jts
Copy link
Contributor

dr-jts commented Aug 27, 2020

What previous bug report?
Can you supply a stack trace?
What kind of CoordinateSequence?
Can you supply code reproducing the problem?

mukoki added a commit to mukoki/jts that referenced this issue Aug 27, 2020
mukoki added a commit to mukoki/jts that referenced this issue Aug 27, 2020
@mukoki
Copy link
Contributor Author

mukoki commented Aug 28, 2020

I added a PR with a test building a 4D XYZM CoordinateSequence which makes RayCrossingCounter#locatePointInRing fail
The fix I propose makes another test fail in Distance3DOp
I propose another fix for this failure consecutive to my first fix, but this is about 3d polygons projected to the XY, XZ or YZ plan, and I have not a clear idea about what all this code does.

mukoki added a commit to mukoki/jts that referenced this issue Aug 31, 2020
mukoki added a commit to mukoki/jts that referenced this issue Aug 31, 2020
@dr-jts
Copy link
Contributor

dr-jts commented Sep 1, 2020

Fixed by #589

@dr-jts dr-jts closed this as completed Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants