Opened 18 years ago
Last modified 13 years ago
#1076 closed defect (fixed)
bug of geotiff file
Reported by: | Owned by: | warmerdam | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description (last modified by )
the sphere(Krasovsky) and datum(Krassovsky) cann't be written into geotiff file(projection can be done),but the same information can be done when the output file is erdas image format,i use gdal 1.3.1,proj4.4.9.
Attachments (1)
Change History (4)
comment:2 by , 18 years ago
When the resulting information is read back from the output imagine file the coordinate system looks like: Driver: HFA/Erdas Imagine Images (.img) Size is 400, 318 Coordinate System is: PROJCS["Transverse Mercator", GEOGCS["Krasovsky", DATUM["Krasovsky", SPHEROID["Krasovsky",6378245,298.3000003760163], TOWGS84[0,0,0,0,0,0,0]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",105], PARAMETER["scale_factor",1], PARAMETER["false_easting",18500000], PARAMETER["false_northing",0], UNIT["meters",1]] When read from TIFF the info looks like: Driver: GTiff/GeoTIFF Size is 400, 318 Coordinate System is: PROJCS["Transverse Mercator", GEOGCS["Krasovsky", DATUM["unknown", SPHEROID["unnamed",6378245,298.3000003760138]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",105], PARAMETER["scale_factor",1], PARAMETER["false_easting",18500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]]] If you inspect the ellipsoid, the size values look fine. The only downside is that the name for the datum and ellipsoid are not preserved, but that is the nature of GeoTIFF and not a real problem. Please re-open if I am missing the point, or you have some fairly specific reason to believe that the datum or ellipsoid name ought to be preserved in GeoTIFF.
comment:3 by , 13 years ago
Description: | modified (diff) |
---|
Hello Frank.
I have had a similar problem, at least with older versions of GDAL/OGR, and I don't understand your last comment:
The only downside is that the name for the datum and ellipsoid are not preserved, but that is the nature of GeoTIFF and not a real problem.
When I import GeoTIFF files via the GDAL library, I trust that OGRSpatialReference can tell me the coordinate reference system. Since the datum shift is not present in GeoTIFF, I look up a datum shift based on the EPSG code for the datum if present, and otherwise based on the datum name. My code can then recognize the datum name if it occurs in either the DATUM_NAME column or the COORD_REF_SYS_NAME column of gcs.csv.
So, if the datum name is not always preserved in GeoTIFF, my approach is imcomplete: I should ask OGRSpatialReference about the GEOGCS name as well, in case the DATUM name is "unknown", as in the example in this ticket. I've recently encountered a GeoTIFF file for which an old version of GDAL (probably 1.5.2) gives "unknown" as the DATUM name, but more recent versions (like the one in FWTools 2.4.7) correctly gives "NTF" both for the DATUM name and the GEOGCS name.
I am confused. I thought that if the GEOGCS name was known, then the DATUM name would always be known too, and that the GeoTIFF stored the DATUM name as metadata. This ticket tells me that I thought wrong. But since the ticket was last changed five years ago, perhaps the information isn't up to date.
Can you comment?