[Proj] hammer parameters?

Frank Warmerdam warmerdam at pobox.com
Wed Jan 12 15:33:48 PST 2011


On 11-01-12 06:01 PM, Hamish wrote:
> William wrote:
>> But, GDAL rejects ob_tran, so I can't really do anything
>> useful with it.  I can't use GRASS to project a raster
>> because hammer appears to not have an inverse (I saw a patch
>> posted to the list last December, but code didn't appear to
>> correctly match the formulas on the mentioned page),
>
> to get around that limitation of r.proj in GRASS, either
>
> - r.to.vect (skip topology), then v.proj
>
> - or..
> the no topology thing can be problematic, so what I did recently
> for reprojecting the ETOPO1 dataset to Winkel Tripel (see [1])
> was output to a text file with r.out.xyz, then in the destination
> location import that with cs2cs | r.in.xyz.
>
> [1] http://adhoc.osgeo.osuosl.org/grass/alternate_projections/earthquakes_wintri.png
>
>> and I don't know if GRASS supports ob_tran either.
>
> AFAIK grass supports anything proj4 does, plus some more.
> If GDAL rejects something the chances are that GRASS might as
> well, but perhaps not. proj4 support is the much more important
> test.
>
>
> fwiw, the line in $GISBASE/etc/proj-params.table reads:
>
> HAMMER:Hammer&  Eckert-Greifendorff:LAT0=ask,0.0;LON0=ask,20.0;MSFACT=ask,1.0;WFACT=ask,0.5
>
> (value after the "ask" is the default answer)

Folks,

For what it is worth, it is possible to embed a literal PROJ.4 string
in GDAL/OGR WKT in which case that will be used as the translation to
PROJ.4 format.

eg.
PROJCS["UTM Zone 11, Northern Hemisphere",
     GEOGCS["WGS 84",
         DATUM["WGS_1984",
             SPHEROID["WGS 84",6378137,298.257223563,
                 AUTHORITY["EPSG","7030"]],
             TOWGS84[0,0,0,0,0,0,0],
             AUTHORITY["EPSG","6326"]],
         PRIMEM["Greenwich",0,
             AUTHORITY["EPSG","8901"]],
         UNIT["degree",0.0174532925199433,
             AUTHORITY["EPSG","9108"]],
         AUTHORITY["EPSG","4326"]],
     PROJECTION["Transverse_Mercator"],
     PARAMETER["latitude_of_origin",0],
     PARAMETER["central_meridian",-117],
     PARAMETER["scale_factor",0.9996],
     PARAMETER["false_easting",500000],
     PARAMETER["false_northing",0],
     UNIT["Meter",1],
     EXTENSION["PROJ4","+proj=utm +zone=11 +datum=WGS84 +wktext"]]

When passing proj.4 strings to GDAL utilities which take
PROJ.4 as input you can include the +wktext option to force
literal inclusion of the PROJ.4 string.  For projections
completely not supported by GDAL you will need to create
WKT with some sort of fake projection (perhaps just use
the above and update the EXTENSION[] portion.

Best regards,
-- 
---------------------------------------+--------------------------------------
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 Programmer for Rent




More information about the Proj mailing list