[gdal-dev] New +axis parameter in PROJ.4 trunk and gdalwarp

Flo Ledermann ledermann at ims.tuwien.ac.at
Tue Jun 7 16:20:58 EDT 2011



On 06/07/2011 08:55 PM, Frank Warmerdam wrote:
> Looking in gdal/ogr/ogr_srs_proj4.cpp which implements the translation
> between PROJ.4 and WKT coordinate system formats for GDAL/OGR it seems
> the only use of the +axis switch is special cases for Transverse Mercator
> South Orientated.  So when you pass a PROJ.4 coordinate system to gdalwarp
> it is internally be translated to WKT and then back to PROJ.4 for final
> use.
> The axis definition is lost in those translations.
>
> ogr_srs_proj4.cpp is the place to add support for axes.

Thanks for the pointer to this file! Reading the source I found a hint
to the proprietary "+wktext" parameter and gave it a shot - and it
worked! Specifying this to preserve the PROJ.4 string through OGR seems
to be sufficient to make this work in gdalwarp!

Best,

Flo


> On 11-06-07 03:44 PM, Flo Ledermann wrote:
>> Hi all,
>>
>> PROJ.4 trunk supports a new parameter "+axis" for projection strings to
>> define axis orientation. With this you can, for example, create an
>> "upside-down" projection by specifying "+axis=wsu" in your projection
>> string. (See http://trac.osgeo.org/proj/wiki/GenParms#Axisorientation )
>>
>> I am trying to use this to create south-up hillshade images. I compiled
>> PROJ.4 trunk and GDAL using --with-static-proj4=/usr/local (where my
>> PROJ.4 is installed), but gdalwarp seems to just ignore the new
>> parameter - the result is the same as with the north-up projection.
>>
>> Can anyone tell me if this is supposed to work and there's just
>> something wrong with my build, or if there is a limitation in GDAL that
>> prevents it from working with upside-down projections? Also if you can
>> give me any pointers to code where this limitation may be fixed I may be
>> able to contribute a patch, if the solution is not too involved.
> 
> Flo,
> 


More information about the gdal-dev mailing list