Opened 7 years ago

Closed 2 years ago

#3442 closed defect (invalid)

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


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 (2)

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

Download all attachments as: .zip

Change History (10)

comment:1 Changed 7 years ago by warmerdam

Component: defaultGDAL_Raster
Keywords: HFA added
Milestone: 1.8.0
Status: newassigned

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 7 years ago by bicealyh

comment:2 Changed 7 years ago by bicealyh

I use the ArcMap? 9.3

comment:3 Changed 7 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:

   Version: 1
   Key_Revision: 1.0
      ModelTiepointTag (2,3):
         0                0                0                
         -1000000         7000000          0                
      ModelPixelScaleTag (1,3):
         25000            25000            0                
      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                

Changed 7 years ago by warmerdam

Attachment: out_dev.tif added

GTiff produced with this projection using GDAL trunk

comment:4 Changed 7 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.

comment:5 Changed 7 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.

comment:6 Changed 7 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?

comment:7 Changed 7 years ago by bicealyh

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

comment:8 Changed 2 years ago by Jukka Rahkonen

Resolution: invalid
Status: assignedclosed

Closing as invalid. Resolution based on the latest comment from the ticket owner "It seem to my mistake. Using the WKT format is OK."

Note: See TracTickets for help on using tickets.