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

Markus Müller markus.u.mueller at zoho.com
Thu Jul 18 15:48:05 PDT 2013


Hi Evan,

removing the '-I' parameter did the trick.


For completeness sake, here the gdalwarp call that worked for me:


gdalwarp -s_srs EPSG:26711 -t_srs '+proj=rhealpix +lon_0=0 +a=1 +ellps=WGS84 +npole=0 +spole=0 +wktext' ~/data/utm_orig.tif rhealpix.tif






Thanks a lot for the help.


Markus

---- On Thu, 18 Jul 2013 14:44:28 -0700 Even Rouault<even.rouault at mines-paris.org> wrote ---- 


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. 
> 
> 
> &gt;&gt;&gt; 
> 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"]] 
> 
> &gt;&gt;&gt; 
> 
> 
> I then tried the same with gdalwarp (on one of the examples file that comes 
> with GDAL) 
> 
> 
> &gt;&gt;&gt; 
> 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. 
> 
> &gt;&gt;&gt; 
> 
> 
> 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 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130718/ae714717/attachment.html>


More information about the gdal-dev mailing list