Ticket #3828 (closed defect: fixed)
[PATCH] EPSG:2163 incorrectly defined in some instances
| Reported by: | kyle | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.8.1 |
| Component: | OGR_SRS | Version: | svn-trunk |
| Severity: | normal | Keywords: | ogr spatialref epsg |
| Cc: |
Description
When applying the EPSG:2163 spatial reference to a file via
$ gdal_translate -a_srs EPSG:2163 in.tif out.tif
The PROJECTION value and the PARAMETER values are not written to the file:
$ gdalinfo -noct out.tif Driver: GTiff/GeoTIFF
Files: out.tif
Size is 4587, 2889
Coordinate System is:
PROJCS["US National Atlas Equal Area",
GEOGCS["Unspecified datum based upon the Clarke 1866 Authalic Sphere",
DATUM["Not_specified_based_on_Clarke_1866_Authalic_Sphere",
SPHEROID["Clarke 1866 Authalic Sphere",6370997,0,
AUTHORITY["EPSG","7052"]],
AUTHORITY["EPSG","6052"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4052"]],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","2163"]]
Origin = (-2050500.000000000000000,752500.000000000000000)
Pixel Size = (1000.000000000000000,-1000.000000000000000)
...
Upper Left (-2050500.000, 752500.000)
Lower Left (-2050500.000,-2136500.000)
Upper Right ( 2536500.000, 752500.000)
Lower Right ( 2536500.000,-2136500.000)
Center ( 243000.000, -692000.000)
...
When I run:
$ testepsg EPSG:2163
Validate Succeeds.
WKT[EPSG:2163] =
PROJCS["unnamed",
GEOGCS["unnamed ellipse",
DATUM["unknown",
SPHEROID["unnamed",6370997,0]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Lambert_Azimuthal_Equal_Area"],
PARAMETER["latitude_of_center",45],
PARAMETER["longitude_of_center",-100],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["Meter",1],
AUTHORITY["EPSG","2163"]]
...
PROJ.4 rendering of [EPSG:2163] = +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs
...
It properly reports the values. The tif cannot be warped as there is no way to get a proj4 rendering:
$ gdalwarp -t_srs EPSG:4326 out.tif warp.tif Copying color table from out.tif to new file. ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed. Creating output file that is 4587P x 2889L. Processing input file out.tif. ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed. 0...10...20...30...40...50...60...70...80...90...100 - done.
If I define the source srs as a proj string, it works:
$ gdalwarp -s_srs "+proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs" -t_srs EPSG:4326 out.tif warp.tif Copying color table from out.tif to new file. Creating output file that is 5791P x 2687L. Processing input file out.tif. 0...10...20...30...40...50...60...70...80...90...100 - done.
I don't know if this a problem with the EPSG csv files, or something else. I would imagine testepsg and gdal_translate use SetFromUserInput?() function to populate the OGRSpatialReference.
I believe that this can be reproduced by translating any tif and applying the srs.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

