[Gdal-dev] gdal output georeference

jwaymel jerome.waymel-ste-exterieure at fr.thalesgroup.com
Fri Jun 13 03:34:53 EDT 2008


Hello

I am working on a conversion pipeline in order to convert mercator tiff
files (not georeferenced) to latlong geotiff.
For the moment I only try to obtain approximately consistent output. The
problem is that my output latitudes are completely inconsistent.

Here are the steps and th results :
==========
  STEP 1 : I use proj command to locate top left corner and bottom right
corner (46N,2W and 43N,1E)
      proj +proj=merc
      46 -2
      5120697 -221194
      43 1
      4786738 110580

  I fill in a tfw file with this information ( source data 448*640)
740.5669643
0
0
-521.8109375
-221194
5120697
     
==========
  STEP 2 : I use geotifcp to create my input file for gdal using tfw file
      geotifcp -e input.tfw input.tif input_geotif.tif

      listgeo input_geotif.tif

     Geotiff_Information:
   Version: 1
   Key_Revision: 1.0
   Tagged_Information:
      ModelTiepointTag (2,3):
         0.5              0.5              0
         -221194          5120697          0
      ModelPixelScaleTag (1,3):
         740.566964       521.810938       0
      End_Of_Tags.
   Keyed_Information:
      End_Of_Keys.
   End_Of_Geotiff.


Corner Coordinates:
Upper Left    ( -221564.283, 5120957.905)
Lower Left    ( -221564.283, 4786998.905)
Upper Right   (  110209.717, 5120957.905)
Lower Right   (  110209.717, 4786998.905)
Center        (  -55677.283, 4953978.405)

==========
  STEP 3 :  I launch gdalwarp
     gdalwarp -s_srs "+proj=merc" -t_srs WGS84 input_geotif.tif output.tif

=========
  STEP 4 : I check my output with listgeo : latitudes do not match at all my
input

Geotiff_Information:
   Version: 1
   Key_Revision: 1.0
   Tagged_Information:
      ModelTiepointTag (2,3):
         0                0                0
         -1.99034582      41.9234149       0
      ModelPixelScaleTag (1,3):
         0.00480331681    0.00480331681    0
      End_Of_Tags.
   Keyed_Information:
      GTModelTypeGeoKey (Short,1): ModelTypeGeographic
      GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
      GeographicTypeGeoKey (Short,1): GCS_WGS_84
      GeogCitationGeoKey (Ascii,7): "WGS 84"
      GeogAngularUnitsGeoKey (Short,1): Angular_Degree
      End_Of_Keys.
   End_Of_Geotiff.

GCS: 4326/WGS 84
Datum: 6326/World Geodetic System 1984
Ellipsoid: 7030/WGS 84 (6378137.00,6356752.31)
Prime Meridian: 8901/Greenwich (0.000000/  0d 0' 0.00"E)

Corner Coordinates:
Upper Left    (  1d59'25.24"W, 41d55'24.29"N)
Lower Left    (  1d59'25.24"W, 39d38'30.62"N)
Upper Right   (  0d59'15.76"E, 41d55'24.29"N)
Lower Right   (  0d59'15.76"E, 39d38'30.62"N)
Center        (  0d30' 4.74"W, 40d46'57.46"N)

You can see my output top latitude is 41d55' instead of 46d00' !
 Do you have any hint ?

Best regards, and thanks a lot for having read until this line !


  I
-- 
View this message in context: http://www.nabble.com/gdal-output-georeference-tp17816836p17816836.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.



More information about the gdal-dev mailing list