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.
Asked
Active
Viewed 858 times
2 Answers
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
user30184
- 65,331
- 4
- 65
- 118
-
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 http://gis.stackexchange.com/questions/72621/how-to-render-area-that-crosses-180%C2%B0 ? does your problem look like the maps here? – Kurt Jun 14 '14 at 03:58
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:
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):

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