I'm having an issue uploading a large polygon tileset to mapbox studio from an R simple features object. From R i've projected my simple features to web mercator and i've tried saving either as shp (zipped) or geojson. All my polygons are rectangular bounding boxes. Everything looks fine in R and QGIS.
But viewed in MapBox studio, you can see that the polygons have been distorted with some vertices removed, turning them into triangles, other polygons are entirely missing. Has anyone seen this before? I know that tilesets undergo "simplification"
https://docs.mapbox.com/help/how-mapbox-works/uploading-data/#how-data-becomes-a-tileset but i'm surprised that vertices are removed and the shape is changed.
Here is same area in my shiny app, same simple features file, adding the polygons directly from leaflet (addPolyLines) and grabbing the mapbox tiles.
It was suggested that a change in zoom would show the bounding boxes. This is not true. Here is the closest zoom level
and furthest zoom level
Also there are many polygons missing. I am not seeing a maximum vertices specification, I will test with with just a handful of polygons and edit the question.
May be related to this thread: https://github.com/mapbox/mapbox-gl-js/issues/9085
My sense is this is genuine bug. As far as i can tell, combining data from wide geographic areas causes this problem. Here is a screenshot that helps demonstrate this.
In blue is an upload covering polygons from across the continental US at different sites in one .shp. Polygons were projected to web meractor, from their appropriate utm coordinates in R before upload.
In red is the same upload script, but the polygons come from the same utm zone. Distortion only happens when the tileset covers a wide geographic area. I am submitting a mapbox studio ticket.