Ticket #3442 (assigned defect)

Opened 4 years ago

Last modified 4 years ago

Using gdalwarp project image, other GIS software can't read the projection's datum, only the software using GDAL.

Reported by: bicealyh Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: svn-trunk
Severity: major Keywords: GTiff
Cc:

Description

I use the gdalwarp transform image from WGS84 to Beijing54, using such method: gdalwarp -of GTiff -t_srs "ESRI::D:\ArcGIS\Coordinate Systems\Projected Coordinate Systems\Gauss Kruger\Beijing 1954\Beijing 1954 3 Degree GK CM 117E.prj" D:\sourImg.img D:\projImg.tif. It can success to transform, but when I use ArcMap? Open this image, It can't read the projection's datum. Using the Erdas also can't read the projection's datum.

Attachments

Beijing 1954 3 Degree GK CM 117E.prj Download (411 bytes) - added by bicealyh 4 years ago.
out_dev.tif Download (71.0 KB) - added by warmerdam 4 years ago.
GTiff produced with this projection using GDAL trunk

Change History

Changed 4 years ago by warmerdam

  • keywords HFA added
  • status changed from new to assigned
  • component changed from default to GDAL_Raster
  • milestone 1.8.0 deleted

Could you attach the "Beijing 1954 3 Degree GK CM 117E.prj" file to this ticket? Also, please indicate the version of ArcMap? being used.

There has been substantial work on GDAL (by ESRI) recently so that coordinate systems not properly represented in .img format by traditional methods will be stored as a PE string. While modern GDAL based ArcMap? versions will support this, older versions may not see this PE string.

Changed 4 years ago by bicealyh

Changed 4 years ago by bicealyh

I use the ArcMap? 9.3

Changed 4 years ago by warmerdam

  • keywords GTiff added; HFA removed

With GDAL trunk I have done the following (b.prj is the attached .prj file and world.tif is a WGS84 world image):

gdalwarp -t_srs ESRI::b.prj ~/public_html/world.tif out_dev.tif \
   -te -1000000 2000000 2000000 7000000 -tr 25000 -25000

Which produced a file (attached) with this listgeo report:

Geotiff_Information:
   Version: 1
   Key_Revision: 1.0
   Tagged_Information:
      ModelTiepointTag (2,3):
         0                0                0                
         -1000000         7000000          0                
      ModelPixelScaleTag (1,3):
         25000            25000            0                
      End_Of_Tags.
   Keyed_Information:
      GTModelTypeGeoKey (Short,1): ModelTypeProjected
      GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
      GTCitationGeoKey (Ascii,33): "Beijing_1954_3_Degree_GK_CM_117E"
      GeographicTypeGeoKey (Short,1): User-Defined
      GeogCitationGeoKey (Ascii,75): "GCS Name = GCS_Beijing_1954|Ellipsoid = Krasovsky_1940|Primem = Greenwich|"
      GeogGeodeticDatumGeoKey (Short,1): Datum_Beijing_1954
      GeogAngularUnitsGeoKey (Short,1): Angular_Degree
      GeogSemiMajorAxisGeoKey (Double,1): 6378245          
      GeogInvFlatteningGeoKey (Double,1): 298.3            
      GeogPrimeMeridianLongGeoKey (Double,1): 0                
      ProjectedCSTypeGeoKey (Short,1): User-Defined
      ProjectionGeoKey (Short,1): User-Defined
      ProjCoordTransGeoKey (Short,1): CT_TransverseMercator
      ProjLinearUnitsGeoKey (Short,1): Linear_Meter
      ProjNatOriginLongGeoKey (Double,1): 117              
      ProjNatOriginLatGeoKey (Double,1): 0                
      ProjFalseEastingGeoKey (Double,1): 500000           
      ProjFalseNorthingGeoKey (Double,1): 0                
      ProjScaleAtNatOriginGeoKey (Double,1): 1                
      End_Of_Keys.
   End_Of_Geotiff.

Changed 4 years ago by warmerdam

GTiff produced with this projection using GDAL trunk

Changed 4 years ago by warmerdam

I don't have ArcMap? handy - I'd have to reinstall from CD. But the GeoTIFF produced seems reasonable. Could you confirm that the attached out_dev.tif has the same problem you were seeing with the datum not being recognised?

I checked with an old version of Erdas Viewfinder and it does not recognise the datum or spheroid. But I believe that is just a deficiency in the geotiff support. I don't believe there is anything wrong with the file itself.

Changed 4 years ago by bicealyh

I use ArcMap? which version is 9.3 Open out_dev.tif, and it give me warning unknown Spatial Reference. It is seem that the ArcMap? can't read the image's Spatial Reference information whic transformed by GDAL.

Changed 4 years ago by bicealyh

I have changed the ESRI format to proj4 format and then use the proj3 format give to -t_srs. The information like below:

Driver: HFA/Erdas Imagine Images (.img) Files: G:\test\Extract_10_1clip.img G:\test\Extract_10_1clip.img.aux.xml Size is 3281, 2130 Coordinate System is: PROJCS["Transverse_Mercator", GEOGCS["GCS_Krassovsky, 1942", DATUM["unknown", SPHEROID["krass",6378245,298.3]], PRIMEM["Greenwich",0], UNIT["Degree",0.017453292519943295]], PROJECTIONTransverse_Mercator?, PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",117], PARAMETER["scale_factor",1], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["Meter",1]] It seem to use the proj4 format to transform the image, the result of image's not have the dataum. Why?

Changed 4 years ago by bicealyh

It seem to my mistake. Using the WKT format is OK.

Note: See TracTickets for help on using tickets.