Feature: Within Expression for Polygon & Polygon Centroid
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
## 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the existing within expression handles polygon geometry and how style or filter expressions are evaluated. Define the intended centroid semantics, including whether centroids are calculated dynamically or supplied as properties. Done means the chosen behavior is implemented and covered by tests, but the issue does not name files or tests to begin with.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100