[gdal-dev] gdalwarp and Natural Earth

Pierre GIRAUD pierre.giraud at gmail.com
Thu Sep 20 07:50:21 PDT 2012


On Sun, Sep 16, 2012 at 5:06 PM, Even Rouault
<even.rouault at mines-paris.org> wrote:
> Le samedi 15 septembre 2012 21:01:10, Pierre GIRAUD a écrit :
>> Hello all,
>>
>> A new "Natural Earth" projection was added recently to the PROJ.4 library.
>> http://www.shadedrelief.com/NE_proj/
>>
>> I'm trying to figure out if and how it is possible to transform a
>> raster file (GeoTIFF) using this projection.
>>
>> I've tried the following unsuccessfully:
>> gdalwarp -t_srs '+proj=natearth' -s_srs EPSG:4326 map_4326.tif
>> map_natearth.tif ERROR 1: Translating source or target SRS failed:
>> +proj=natearth
>>
>> Does GDAL have support for this projection? Does it rely on PROJ for
>> that purpose? Should I have something to be configured specifically
>> while compiling it?
>
> With GDAL < 2.0, you can try the following :
>
> -t_srs 'LOCAL_CS["foo", EXTENSION["PROJ4", "+proj=natearth +wktext"]]'
>
> This is a bit hackish, but that should work with any PROJ.4 projection that
> isn't explicitely supported by GDAL.

This works fine.
Thanks a lot.

>
> With GDAL 2.0dev, the following is sufficient :
>
>  -t_srs '+proj=natearth +wktext'

This doesn't work. Even on a newly compiled GDAL.
But I may have missed something.

>
> Note that, in both cases, you need to specify +wktext to instruct GDAL not to
> alter the proj.4 string that is specified.
>
>>
>> Thanks for your help.
>> Pierre


More information about the gdal-dev mailing list