-
Notifications
You must be signed in to change notification settings - Fork 962
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Suggestion: Generalise bboxClip to support all GeoJSON object types #2813
Comments
Ah, I have eventually discovered that
But I suspect |
Thanks @stevage. Would Alternatively, would we be better off adding a new general purpose Your example would only need a minor mod:
|
I don't think In any case, operations using a general polygon (as opposed to a bbox) are orders of magnitude slower, and mostly what I (and probably others) need is the bbox clip. So I've gone and implemented this in #2814. |
Ah ok. From the initial post you mentioned there being no easy way to "crop ... to a polygon or bbox" so thought you wanted to add clipping with a polygon as well. Will take a look at #2814. |
Yeah, well, I did. But on further reflection, a general clipping function and a bbox clipping function are probably best kept as two separate concepts. |
Well, this is bizarre, I've just discovered issue #1565. Apparently I made exactly the same suggestion in January 2019. I have no memory of this. That issue got a bit derailed by the topic of spatial indexing. |
There is not really an easy way to crop a featureCollection (or other geometry type) to a polygon or bbox.
There are times when I just want to do:
or
It's relatively easy to use intersect to crop
Polygon
s, andbooleanPointInPolygon
to filter outPoint
s, but I'm not even sure if there's a straightforward way to cropLineString
s currently.The text was updated successfully, but these errors were encountered: