-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Feature: Within Expression for Polygon & Polygon Centroid #9795
Comments
Sorry I opened a similar request in #10479. I reference it here to track them together. This feature is very useful, and I'm curious why Polygon check was left out. It should not be too hard to implement as long as Polygon perimeter can be considered a LineString. I'm also wondering if a less strict interpretation of what |
I am now looking into this issue. I will update once I have a solution for it. |
'distance' expression in this pull request would be a solution to this issue. It's not a strict 'within' expression, but distance is 0 if two polygons intersect or one is within another. |
@zmiao
|
@enersis-pst are you referring to the
|
@zmiao yes. looks good. Thanks for that example. Nice and very flexible feature. Hope it will be merged soon. |
Is there any status update on this feature. Just ran into a need for it today. |
@mkandarEsource we've introduced the |
@zmiao Possibly, let me explain the use case. We have a snipping tool on the map we're building. The user draws a polygon and then the features within that polygon are filtered in. Issues we've run into so far:
If a distance of 0 entails that the feature is within (or likely intersected by) the polygon drawn by our snipping tool, we can work with that. There isn't a hard requirement to do "within" so an "intersects" would work. I'll test it out and let you know. |
@zmiao That does work as a geo intersects, which is sufficient |
Motivation
Would be nice to style or filter all polygons which are inside a specific polygon.
Within means the polygon is full inside of the other. But for a polygon selection it looks like more correct when only the centroid of the polygon is within the other.
So it would be nice not only to use within with a polygon but also with it centroid.
Otherwise if the calculation of centroid is to heavy, it would be nice to precalculate the centroid, load it into the mbtile as property and then use it for the within. This means using the within with properties.
The text was updated successfully, but these errors were encountered: