[gdal-dev] For a raster file header how do I transform the GCP Projection and GCP into a format where instead the Coordinate System contains corner coordinates?

John Mitchell mitchelljj98 at gmail.com
Tue Sep 16 15:20:58 EDT 2008


Hi,

For a raster file header how do I transform the GCP Projection and GCP into
a format where instead the Coordinate System contains corner coordinates?

*Below is an example of a portion of a header file containing GCP Projection
and GCP and below the dotted line is how I would like it transformed.*

Driver: GTiff/GeoTIFF
Size is 11601, 9027
Coordinate System is `'
GCP Projection = GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS
84",6378137,298.2572235630016,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]
GCP[  0]: Id=1, Info=
          (264,8127) -> (-95.8337916667,28.533825,0)
GCP[  1]: Id=2, Info=
          (264,275) -> (-95.8337916667,29.1006305556,0)
GCP[  2]: Id=3, Info=
          (11245,275) -> (-94.9336861111,29.1006305556,0)
GCP[  3]: Id=4, Info=
          (11245,8127) -> (-94.9336861111,28.533825,0)
GCP[  4]: Id=5, Info=
          (10436,8127) -> (-94.9999972222,28.533825,0)

*
..............................................................................
*

Driver: GTiff/GeoTIFF
Size is 1800, 900
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.2572235630016,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-99.000000000000000,27.000000000000000)
Pixel Size = (0.001111111111111,-0.001666666666667)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_SOFTWARE=Adobe Photoshop CS Windows
  TIFFTAG_DATETIME=2005:12:26 22:09:51
  TIFFTAG_XRESOLUTION=72
  TIFFTAG_YRESOLUTION=72
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Corner Coordinates:
Upper Left  ( -99.0000000,  27.0000000) ( 99d 0'0.00"W, 27d 0'0.00"N)
Lower Left  ( -99.0000000,  25.5000000) ( 99d 0'0.00"W, 25d30'0.00"N)
Upper Right ( -97.0000000,  27.0000000) ( 97d 0'0.00"W, 27d 0'0.00"N)
Lower Right ( -97.0000000,  25.5000000) ( 97d 0'0.00"W, 25d30'0.00"N)
Center      ( -98.0000000,  26.2500000) ( 98d 0'0.00"W, 26d15'0.00"N)
Band 1 Block=1800x1 Type=Byte, ColorInterp=Red
Band 2 Block=1800x1 Type=Byte, ColorInterp=Green
Band 3 Block=1800x1 Type=Byte, ColorInterp=Blue

-- 
John J. Mitchell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080916/50aa4fc8/attachment.html


More information about the gdal-dev mailing list