-
Notifications
You must be signed in to change notification settings - Fork 950
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
Initial commit remove jsts for turf/difference #1225
Conversation
🎉 Woot! Those benchmarks look amazing! Great job @rowanwins implemented this and thanks @w8r for the work on Martinez |
@@ -43,22 +43,16 @@ function difference(polygon1, polygon2) { | |||
var geom2 = getGeom(polygon2); | |||
var properties = polygon1.properties || {}; | |||
|
|||
// Issue #721 - JSTS can't handle empty polygons | |||
// Issue #721 - JSTS/Martinez can't handle empty polygons |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😢 Same issue is occuring with Martinez?...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes the issue still occurs in Martinez but I didn't dig into it too deeply at 11pm so I'll look into it further
@@ -7,50 +7,54 @@ | |||
"fill-opacity": 1 | |||
}, | |||
"geometry": { | |||
"type": "Polygon", | |||
"type": "MultiPolygon", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rowanwins 🤔 ... you sure this is correct?... That was the initial issue was trying to handle the holes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct - so martinez currently has an issue around this, I had a thought on how to resolve it last night lying in bed so I'll try and tackle it today
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI I have a pull request in to resolve this issue upstream in martinez
@rowanwins Going to put this PR on the back burner until your PR w8r/martinez#55 gets resolved/merged. |
Just merged w8r/martinez#55 and released on npm |
👍 Great Thanks @w8r I'll update this PR with your new changes to Martinez. |
Edit: This appears to be a problem internal to martinez, part of w8r/martinez#35 I was checking out to see if this branch fixes #1224 and it appears that right now, this branch still has problems with the situation described by #1224. Here's a test case that can be dropped into {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[[-1, -10], [0, -10], [0, 10], [-1, 10], [-1, -10]]]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[[[-1, -10], [0, -10], [0, 10], [-1, 10], [-1, -10]]],
[[[0, -10], [1, -10], [1, 10], [0, 10], [0, -10]]]
]
}
}
]
} |
Thanks for the research and test case @mfogel - we'll take a look and see what we can do |
👍 Looks like it's working now. Going to publish this under CC: @rowanwins @w8r |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
npm test
at the sub modules where changes have occurred.npm run lint
to ensure code style at the turf module level.Well I thought I'd make the much anticipated start of removing jsts from turf using martinez.
The initial commit covers turf/difference only.
So far
create-hole
, this is a known issue in Martinez at the moment,I'll try and dig into this some more.Benchmarks
Generally martinez is smashing with jsts although there are a few exceptions around issue 721 for some reason...
Anyway off to pretty good start I think thanks to the incredible work by @w8r