[gdal-dev] [PATCH v2] Support Mercator_2SP in GeoTIFF

Trent Piepho tpiepho at gmail.com
Wed Nov 20 14:32:21 PST 2013


On Wed, Nov 20, 2013 at 1:35 AM, Even Rouault
<even.rouault at mines-paris.org> wrote:
>
> Le mercredi 20 novembre 2013 03:29:25, Trent Piepho a écrit :
> > That file had both StdParallel1 and ScaleAtNatOrigin defined.
> >
> > I've uploaded two new files.  This one has only StdParallel1 defined with
> > no ScaleAtNatOrigin.
> > https://drive.google.com/file/d/0BybuTedE9CLxRnNlNUl2Zm5JRzg/edit?usp=shari
> > ng
> >
> > This file has the lat_ts stored in NatOriginLat and no ScaleAtNatOrigin
> > defined.
> > https://drive.google.com/file/d/0BybuTedE9CLxMzltYlBFWU51RzA/edit?usp=shari
> > ng
> >
> > I think the latter might have better compatibility.  Yet it seems to
> > clearly be the incorrect way to do it.
>
> If the way of encoding/decoding is changed, it would be best to do it the
> "right" way and eventually other vendors will catch up with this
> interpretation.

Right now the way GDAL handles Mercator_2SP doesn't work with
anything, including GDAL.  So clearly it should be changed to
something else.

Of the two options, one (StdParallel1) would appear to be the correct
way and the other (NatOriginLat) might have better compatibility with
existing software.  It would be nice to see the results of testing the
file using NatOriginLat, to see if it does indeed work correctly with
other software.

GDAL could be patched to read both options as Mercator_2SP.  It's not
correct, but given that there appears to be a lot of software that
places the latitude of true scale in NatOriginLat and that using an
origin other than the equator for Mercator is not something commonly
done, it's going to be the right guess almost all the time.


More information about the gdal-dev mailing list