[gdal-dev] using gdalwarp with a new projection in proj.4
Markus Müller
markus.u.mueller at zoho.com
Thu Jul 18 14:05:45 PDT 2013
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?
Many thanks,
Markus
---- On Tue, 16 Jul 2013 23:55:05 -0700 Frank Warmerdam <warmerdam at pobox.com> wrote ----
Michael,
Healpix is not directly supported by OGRSpatialReference - the core of the coordinate system machinery for GDAL/OGR. However, you can request GDAL to treat this as a PROJ.4 extension to WKT by adding the +wktext flag. I would add that the -E and -f flags are options to the cs2cs commandline program, and not part of a PROJ.4 coordinate system and so should not be included. The result is something like this:
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"]]
Best regards,
Frank
On Tue, Jul 16, 2013 at 6:48 PM, Michael Speth <spethm at landcareresearch.co.nz> wrote:
Greetings, I am unable to use the HEALpix and rHEALPix projections which have been added about a year ago to proj.4 in gdalwarp. Is there a configuration file for gdal that needs to be updated for this projection?
Here is the command in question that fails:
gdalwarp -s_srs EPSG:26711 -t_srs '+proj=rhealpix -f '%.2f' -I +lon_0=0 +a=1 +ellps=WGS84 +npole=0 +spole=0 -E' ~/data/utm_orig.tif rhealpix.tif
The error message
“Translating source or target SRS failed:”
Thanks
--
Michael Speth Research Systems Developer Landcare Research
Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.
The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Software Developer
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130718/c5aac9af/attachment.html>
More information about the gdal-dev
mailing list