[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?
Even Rouault
even.rouault at mines-paris.org
Wed Sep 17 13:37:25 EDT 2008
gdalwarp is your friend ! See http://gdal.org/gdalwarp.html
Or if I see well from the relationship between the pixel and georeferenced
coordinatesif your image doesn't really need to be warped, you could also try
gdal_translate -a_srs srs_def -a_ullr ulx uly lrx lry.
Le Tuesday 16 September 2008 21:20:58 John Mitchell, vous avez écrit :
> 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","6
>326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EP
>SG","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
More information about the gdal-dev
mailing list