[Gdal-dev] OGR's importFromEPSG depends on libgeotiff?
Ben Discoe
ben at vterrain.org
Fri Oct 7 03:21:50 EDT 2005
> From: Frank Warmerdam
> Sent: Thursday, October 06, 2005 5:08 PM
>
> > what method provides the inverse of importFromEPSG().
> > That is, given a common CRS in an OGRSpatialReference, can
> > it return an EPSG coordinate system code
>
> Unfortunately this direction does not exist currently as a
> method on the OGRSpatialReference.
Interesting, that is surprising. I don't know the internals of GeoTIFF, but
i always assumed it used an EPSG code to store projection, so the GeoTIFF
code would need to have such a function somewhere. I tried to study the
code to learn how it is done, but the GeoTIFF code is quite complex.
> In libgeotiff there is a function
> GTIFMapSysToPCS() that does that a bit for some simple cases.
> But it only works for a few common hardcoded cases (ie. UTM WGS84).
Indeed simple, and it doesn't work on a OGRSpatialReference. I found it in
geo_extra.c, and it doesn't appear to be called.
> It has been an ambition of mine to some day build such a thing.
I would be very curious to know what GeoTIFF _does_ store for CRS, if it's
not as simple as a single integer EPSG code.
Thanks,
Ben
More information about the Gdal-dev
mailing list