[gdal-dev] using gdalwarp with a new projection in proj.4

Even Rouault even.rouault at mines-paris.org
Thu Jul 18 14:44:28 PDT 2013


Le jeudi 18 juillet 2013 23:05:45, Markus Müller a écrit :
> Hi Frank,
> 
> thanks for the reply. I did as you suggested and gdalsrsinfo acts
> accordingly.
> 
> 
> >>>
> gdalsrsinfo '+proj=rhealpix -I +lon_0=0 +a=1 +ellps=WGS84 +npole=0 +spole=0
> +wktext'
> 
> 
> PROJ.4 : '+proj=rhealpix -I +lon_0=0 +a=1 +ellps=WGS84 +npole=0 +spole=0
> +wktext'
> 
> 
> OGC WKT :
> PROJCS["unnamed",
>     GEOGCS["WGS 84",
>         DATUM["unknown",
>             SPHEROID["WGS84",6378137,298.257223563]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree",0.0174532925199433]],
>     PROJECTION["custom_proj4"],
>     EXTENSION["PROJ4","+proj=rhealpix -I +lon_0=0 +a=1 +ellps=WGS84
> +npole=0 +spole=0 +wktext"]]
> 
> >>>
> 
> 
> I then tried the same with gdalwarp (on one of the examples file that comes
> with GDAL)
> 
> 
> >>>
>  gdalwarp -s_srs EPSG:26711 -t_srs '+proj=rhealpix -I +lon_0=0 +a=1
> +ellps=WGS84 +npole=0 +spole=0 +wktext' ~/data/utm_orig.tif rhealpix.tif
> Processing input file /home/markus.mueller/data/utm_orig.tif.
> ERROR 6: Failed to initialize PROJ.4 with `+proj=rhealpix -I +lon_0=0 +a=1
> +ellps=WGS84 +npole=0 +spole=0 +wktext'.
> 0...10...20...30...40...50...60...70...80...90...100 - done.
> 
> >>>
> 
> 
> It produces an output file though. Should I be concerned about the created
> error or can I ignore it?

Markus,

Yes, you shouldn't ignore this error. Ideally gdalwarp shouldn't complete when 
such an error occurs. I'll look at that.

First, you should also remove the '-I' parameter. It is a argument of the proj 
command line utility, not a parameter of a PROJ.4 projection string.

Secondly, looking at PROJ history ( 
http://trac.osgeo.org/proj/log/trunk/proj/src/PJ_healpix.c and 
http://trac.osgeo.org/proj/log/tags/4.8.0?rev=2377 ), I see that this 
projection was only introduced in PROJ 4.8.0, so check your PROJ.4 version. I 
also see that a few fixes have been pushed after the 4.8.0 release, so if you 
run into bugs, you might need to compile the trunk version of the svn 
repository.

Best regards,

Even

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list