score:5

Accepted answer

For now, you need to fix your data by hand, say by editing the TopoJSON directly, or by converting the Shapefile to GeoJSON and then doing a similar edit, or by using a Shapefile editor.

In the future, the topojson command-line tool should be able to fix this for you by stitching together polygons that cross the antimeridian (±180° longitude), removing antimeridian cuts that are often present in currently-available geometry.

It’s already the case that topojson removes antimeridian cuts. However, currently it can only remove antimeridian cuts within a single ring, and here the Russia polygon has been split into two (or more) rings where it crosses the antimeridian; topojson is not yet smart enough to stitch multiples rings cut at the antimeridian back into a single ring. (You might be able to use topojson.mesh to do this, however.)

As for why the antimeridian cuts are there in the first place: many geo tools don’t fully support spherical coordinates, so it’s common to find data that cuts polygons along the antimeridian to prevent visual artifacts from appearing when projecting. (You can read about antimeridian cuts in my For Example talk.) D3 and topojson use true spherical coordinates with great-arc interpolation between points, so that you can represent polygons that surround poles or cross the antimeridian without cuts. However, because most existing data is precut at the antimeridian, topojson must remove the cuts to restore the true spherical geometry.


Related Query

More Query from same tag