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

MapBox GL can fail with very small triangular rings... #5731

Closed
sdlime opened this Issue Jan 15, 2019 · 3 comments

Comments

Projects
None yet
1 participant
@sdlime
Copy link
Member

sdlime commented Jan 15, 2019

MapBox GL fails silently when it encounters a small triangular rings with an area of .5 pixels although very thin triangles also cause issues. It simply stops drawing rings for the feature in question. It's arguable if this is a MapBox GL bug or something inherent to MapServer MVT encoding.

Big Sandy lake in the mvt-demo is the best example I've run across. That geometry has a second tiny outer ring that transforms to a 1/2 pixel area triangle at many resolutions. Because it's an outer ring any subsequent inner rings aren't being drawn so it's very obvious there is an issue. At lower resolutions that outer ring is degenerate and the issue goes away. However, even a narrow triangle (area=3) seems to break things - this is with version 0.31, need to try latest and greatest.

--Steve

@sdlime

This comment has been minimized.

Copy link
Member Author

sdlime commented Jan 15, 2019

Confirmed 0.51 also has problems with the Big Sandy. --Steve

@sdlime sdlime changed the title MapBox GL fails with polygons smaller than a pixel in size... MapBox GL can fail with very small polygons... Jan 15, 2019

@sdlime

This comment has been minimized.

Copy link
Member Author

sdlime commented Jan 21, 2019

I've only been able to replicate the issue with triangles with height (opposite longest base) less than one - basically polygons trending towards a point or a line. Removing rings of this nature seems to fix the rendering issue.

@sdlime sdlime changed the title MapBox GL can fail with very small polygons... MapBox GL can fail with very small triangular rings... Jan 21, 2019

sdlime added a commit to sdlime/mapserver that referenced this issue Jan 21, 2019

@sdlime

This comment has been minimized.

Copy link
Member Author

sdlime commented Jan 21, 2019

Fixed...

@sdlime sdlime closed this Jan 21, 2019

sdlime added a commit that referenced this issue Jan 23, 2019

Merge pull request #5737 from sdlime/issue-5731-2
Make sure computed triangle height is always positive. (#5731)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.