[Geotiff] proj4 support question and bug?

Frank Warmerdam warmerdam at pobox.com
Fri Apr 3 13:51:36 EST 2009


brownrigg at sunflower.com wrote:
> A question and a bug(?):
> 
> Q: While it appears there's support for specifying projections in libgeotiff
> using proj4-style strings, I was recently surprised and disappointed to find
> that there's only a rather small set of projections actually supported.
> Browsing the code in "geotiff_proj4.c", it looks like much code was lifted
> from OGR, but is commented out, presumably because it makes use of OGR API
> functions not available in libgeotiff (?)  Can someone comment on what is
> required to implement broader proj4 projection support in libgeotiff?  It is
> simply a matter of following the patterns set out for the current
> projections (i.e., set as approp. GMModelTypeGeoKey, ProjectedCSTypeGeoKey,
> ProjectionGeoKey, ProjCoordTransGeoKey, plus additional projection-specific
> tags)?

Rick,

Generally yes, you can just add more cases using a similar pattern.  Please
ensure that writing geotiff files you always use the same parameters that
the normalization code uses for any projection method.

> Bug: In geotiff_proj4.c, v1.2.5, around lines 395 -- 429, there are two
> cases for Lambert Conformal (lcc) that are identical conditionals.  They
> appear to be intended to handle the 1 vs. 2 standard parallel cases. I
> believe in the  2nd conditional, at line 427, should read lat_0 != lat_1,
> not lat_0 == lat_1 (?).

I have corrected this in SVN at your suggestion.

Thanks,
-- 
---------------------------------------+--------------------------------------
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 Geotiff mailing list