I think it is the common issue - rendering vector map crosses 180 meridian. But still no success - I didn't come to any correct solution.
The problem is, I have vector layer (exactly, linestring layer in EPSG:4326) in my DB (that crosses 180 meridian) and I would like to create .mbtiles from the layer for rendering in web app. When uploading to MapBOX Studio and visualize it, I have find out the lines through my screen:
My steps are the following: Custom Vector Tiles from PostGIS
I know there is tippecanoe option -aw (Detect when consecutive points within a feature jump to the other side of the world, and try to fix the geometry) for this case, but for me it is not suitable - I generate vector tiles via docker-compose run generate-vectortiles.
I tried to use ST_ShiftLongitude before ST_Transform to EPSG:3857 - lines are not disappear;
The only solution is to divide layer in 2 parts by 180 meridian (with st_intersection) - for cut the geometries in east and west hemispheres and then merge them.
I believe there is more elegant solution, obviously I am not come to it. Hope any suggestions or links?