How to have continuous features for a shapefile and get rid off the wrapdateline?

271 Views Asked by At

How to have continuous features for a shapefile ? I mean NOT cut by the dateline to respect [-180:180] longitude excursion that I do not want to respect.

Here is an example where I display the Russia shapefile in a leaflet map. In fact I would like to have continuous continent.

enter image description here

Shapefile comes from https://gadm.org/about.html

Any command from gdal or ogr2ogr to merge separated features ?

Thanks

1

There are 1 best solutions below

2
Val On

If you load the GADM level-0 layer into QGIS and toggle Show Feature Count, you'll see that, even though the shape seems split, the actual layer only has a single feature:

enter image description here

Your shape gets cut off because the polygon crosses the boundary in the projection you are using and gets wrapped around. This doesn't mean the features get actually split.

If you want to display it as a continuous feature, you need to specify an appropriate projection. For instance, using the example here gives me this:

enter image description here

This is just one way, there might be different projections that fit your purpose better. Also, getting this done in leaflet is a different question.