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

Add Polygon to evaluable geometry for within expression #10479

Closed
markusand opened this issue Mar 17, 2021 · 1 comment
Closed

Add Polygon to evaluable geometry for within expression #10479

markusand opened this issue Mar 17, 2021 · 1 comment

Comments

@markusand
Copy link

markusand commented Mar 17, 2021

Motivation

The within expression simplified a lot the visualization of features depending on their geometry, but only Point and LineString are supported (according to docs). I would find very useful to support Polygon as well, specially as I'm working with polygon cells.

It may be a discussion of what whitin means for polygon (fully contained, some intersection, ...) but that is the same case with LineString, isn't it? I would consider a Polygon intersecting another one as within

Implementation

Polygon contour can be considered a LineString, so I guess it would be quite straightforward to perform the operation.
This change would not affect the public API of MapboxGL.

@asheemmamoowala
Copy link
Contributor

Closing as duplicate of #9795 to keep the discussion in one place. @markusand Thanks for also commenting there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants