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

Bug 581 ray crossing with 4d coord #586

Closed

Conversation

mukoki
Copy link
Contributor

@mukoki mukoki commented Aug 27, 2020

Test to demonstrate #581 bug and proposal to fix it

@dr-jts
Copy link
Contributor

dr-jts commented Aug 28, 2020

The fix looks good to me. Are you going to sign an ECA?

@dr-jts
Copy link
Contributor

dr-jts commented Aug 28, 2020

Actually I'm thinking a better fix might be to add a RayCrossingCounter.countSegment that accepts ordinate values instead of coordinates.

Thoughts? I can make a PR for this.

@mukoki
Copy link
Contributor Author

mukoki commented Aug 28, 2020

The fix looks good to me. Are you going to sign an ECA?

Wow, lot of ceremony. I just filled the ECA form, but I don't know how to link my commits to this document.

@mukoki
Copy link
Contributor Author

mukoki commented Aug 28, 2020

Actually I'm thinking a better fix might be to add a RayCrossingCounter.countSegment that accepts ordinate values instead of coordinates.

Thoughts? I can make a PR for this.

I think you're right. We don't really need to get coordinates with the exact coord dimension. We rather need x,y from both coordinates. In this case, you can also remove p1 and p2 coordinate creation and ring.getCoordinate(i, p1) call which is the place where the error occured.

@dr-jts
Copy link
Contributor

dr-jts commented Aug 28, 2020

Wow, lot of ceremony. I just filled the ECA form, but I don't know how to link my commits to this document.

Yes, the bureaucracy is annoying. AFAIK you can't amend this PR - you have to create another one.

@dr-jts
Copy link
Contributor

dr-jts commented Aug 31, 2020

Another possibility - just use CoordinateSequence.getCoordinate. Pretty sure modern JVMs optimize small object creation highly, so perhaps this is performant enough to use. Confirming this with a performance test would be good.

@mprins
Copy link
Contributor

mprins commented Aug 31, 2020

Wow, lot of ceremony. I just filled the ECA form, but I don't know how to link my commits to this document.

Yes, the bureaucracy is annoying. AFAIK you can't amend this PR - you have to create another one.

when you go to https://accounts.eclipse.org/legal/eca/validation/45250 you cab see that a signed commit is needed, use git commit -a -s

@mukoki
Copy link
Contributor Author

mukoki commented Aug 31, 2020

Another possibility - just use CoordinateSequence.getCoordinate. Pretty sure modern JVMs optimize small object creation highly, so perhaps this is performant enough to use. Confirming this with a performance test would be good.

Do you mean as I did in the commit (bf88792) ?
Seems to work, but probably do more work than necessary compared to your idea to just use x,y ordinates. I'll try to test the later idea. Not sure I can easily compare performance though.

@dr-jts
Copy link
Contributor

dr-jts commented Aug 31, 2020

Another possibility - just use CoordinateSequence.getCoordinate. Pretty sure modern JVMs optimize small object creation highly, so perhaps this is performant enough to use. Confirming this with a performance test would be good.

Do you mean as I did in the commit (bf88792) ?

I'm seeing that commit use createCoordinate?

I mean using CoordinateSequence.getCoordinate(i). That results in a Coordinate being created for every access, but this should be fairly efficient.

@dr-jts
Copy link
Contributor

dr-jts commented Sep 1, 2020

Superseded by #589

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

Successfully merging this pull request may close these issues.

3 participants