[gdal-dev] epsg:nnnn results differ from +proj=....

Frank Warmerdam warmerdam at pobox.com
Tue Dec 11 13:05:28 EST 2007


Matt Wilkie wrote:
> dear gdal,
> 
> If I assign a projection using an epsg code I get a different result
> from gdalinfo than if I assign using the proj4 parameters. Shouldn't the
> results be the same?
> 
> 
> The proj4 text shown was copied verbatim out of
> %fwtools_dir%\proj_lib\epsg for the entry <3578>
> 
> 
> ----------------------
> GDAL 1.5.0b1, FWTools 2.0.2, released 2007/12/05
> 
> gdal_translate source.tif test-epsg.tif -a_srs EPSG:3578
> 
> gdal_translate source.tif test-proj4.tif -a_srs "+proj=aea
> +lat_1=61.66666666666666 +lat_2=68 +lat_0=59 +lon_0=-132.5 +x_0=500000
> +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"

Matt,

There are surprisingly different approaches used in these two cases.

Basically, when you wrote based on EPSG:3578, the geotiff file was
written with the EPSG code instead of the detailed parameters.  But
unfortunately libgeotiff does not support reading Albers based projections
from the EPSG tables (even though GDAL does know how).  This is an omission
in the libgeotiff library.  The result is a failure to read the geotiff
file back properly.

The proj.4 case does not have the EPSG # in the definition, so GDAL just
writes a geotiff with all the parameters encoded instead of assuming the
reading application can get them from the EPSG dataset.  This works fairly
well, but lacks nice stuff like coordinate system names.

I have committed a fix in libgeotiff to support Albers, and I have
pulled that into GDAL's internal copy of libgeotiff. So the 1.5.0 release
should work properly (as will future FWTools builds).  Unfortunately
libgeotiff based software, including GDAL and ArcGIS is likely to continue
having problems with the new Yukon coordinate system definitions from
GeoTIFF files for some time to come till this libgeotiff fix percolates
through the software ecology.

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    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list