1

I have some shapefiles of the world from Natural Earth at WGS84. I would like to convert them to the Miller Projection. I have ogr2ogr, but I'm not sure what the parameters for this conversion should be, or if this conversion can be done with it.

1

Because the eastern part of Russia crosses the 180° meridian, you have to cut your shapefile there. I have written a tutorial for cutting at any meridian to use the Natural Earth shapefiles here:

QGIS display world country shape files centered on pacific ocean using Robinson, Miller Cylindrical or other projection

The clipping polygon for your case is:

Nr;WKT
1;POLYGON ((180.1 90, 179.9 90, 179.9 -90, 180.1 -90, 180.1 90))

giving you this result with EPSG:53003 (the spherical version of the Miller projection):

enter image description here


EDIT

If this works in QGIS, it works as well with pure ogr2ogr:

ogr2ogr -clipsrclayer D:\Karten\shp\Projektionen\180deg.txt -t_srs EPSG:53003 D:\Karten\shp\Projektionen\ne-miller.shp D:\Karten\shp\NaturalEarth\ne_110m_admin_0_countries.shp
1

Test if target srs epsg:54003 gives correct result. You can check with some coordinates with gdaltransform first:

>gdaltransform -s_srs epsg:4326 -t_srs epsg:54003
20 40
2223901.03956182 4674067.69647085 -1662.3178422926
  • It works, but it gets all weird at the edges, particularly in Russia, Alaska, Fiji, etc. Horizontal lines from edge to edge appear. Would that be fixable? – calvillo Jun 13 '14 at 20:41
  • Sorry, too technical thing for me. Perhaps mail to gdal-dev mailing list could help. Attach your command and link to source data and screen capture from the wierd result. – user30184 Jun 13 '14 at 20:57
  • @user30184 : have you taken a look at gis.stackexchange.com/questions/72621/… ? does your problem look like the maps here? – Kurt Jun 14 '14 at 3:58

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.