The problem is that the Chukotka Peninsula is located in the Western Hemisphere. So it is on the left side of Natural Earth Datasets. It needs to be moved to the right. I tried to use following srs(Coordinate system in which the map is rendered) - centered on 11°E :

+proj=mill +lat_0=0 +lon_0=11 +x_0=0 +y_0=0 +R_A +a=6371000 +b=6371000 +units=m +no_defs

And get this result (notice horizontal straight lines):


Obviously I did something wrong.

This is similar unanswered question: http://lists.berlios.de/pipermail/mapnik-users/2009-January/001497.html

I have tried some actions from there as well.

How can I get the world to wrap around a different meridian?

Do I need to process the data through org2org or something?

More images with +lon_0=+-15 :

world1 world2

Images from linked question from mailing list :

world3 world4

What's the problem with this pictures? How do I make it right?

  • Have you searched our site for similar questions? Perhaps you will find an answer is already posted.
    – whuber
    Sep 27 '13 at 15:45
  • @whuber, I believe only this question is vaguely related (using your search suggestion). And this is even farther. Sep 27 '13 at 16:35
  • 1
    Could you make the horizontal lines a bit more visible? Light gray on dark gray ain't a good choice. Sep 28 '13 at 8:23
  • 1
    take a look here: gis.stackexchange.com/questions/70411/…
    – Kurt
    Sep 28 '13 at 9:27
  • 1
    There are several solutions here. JEQL does it only with three lines! Sep 29 '13 at 18:14

It's clear that it's not necessary to shift the projection, but the data. Using GDAL >= 1.10.0 compiled with SQLite and SpatiaLite:

ogr2ogr russia_shifted.shp world.shp -dialect sqlite -sql "SELECT ShiftCoords(geometry,360,0) FROM world WHERE CNTRY_NAME='Russia'"

where shiftX = 360 (degrees) and shiftY = 0.

enter image description here

UPDATE: here's the whole workflow...

Clip world.shp between -169° and +180° of longitude in order to exclude the Chukotka Peninsula (1st part):

ogr2ogr world_clip.shp world.shp -clipsrc -169 -90 180 90

Shift and clip world.shp between +180° and +191° of longitude in order to include the Chukotka Peninsula (2nd part):

ogr2ogr Chukotka_Peninsula.shp world.shp -dialect sqlite -sql "SELECT CNTRY_NAME, ShiftCoords(geometry,360,0) FROM world" -clipsrc 180 -90 191 90

Merge the two parts:

ogr2ogr world_shifted.shp world_clip.shp
ogr2ogr -update -append world_shifted.shp Chukotka_Peninsula.shp -nln world_shifted

Finally, dissolve countries boundaries of world_shifted.shp obtaining world_output.shp:

ogr2ogr world_output.shp world_shifted.shp -dialect sqlite -sql "select ST_Union(Geometry),CNTRY_NAME FROM world_shifted GROUP BY CNTRY_NAME"

Here's the graphical result:

enter image description here

  • Thank you very much for the update. I see correct results. Unfortunately, I cannot try this solution myself now. I am using ArchLinux and it seems to not have GDAL compiled with SpatiaLite, so I get an error: no such function: ShiftCoords. I'll try to solve this technical issue soon and then I'll give a feedback if your answer suits me well. Oct 4 '13 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.