Hi Folks,<br><br>I was just wondering if there is a generic way to extract CRS/Projection information from a generic raster image for which there exists geo information..<br><br>What would be nice would be to use the output from gdalinfo to extract a Proj4 CRS string which defines the coordinate system of the image under investigation..<br>
<br>For example, I have a SPOT image with the following gdalinfo output:<br><br>Driver: GTiff/GeoTIFF<br>Files: IMAGERY.TIF<br>Size is 24000, 24000<br>Coordinate System is `'<br>GCP Projection = GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.2572235629972,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]<br>
GCP[ 0]: Id=1, Info=<br> (1,1) -> (12.2141588220865,42.2864439118571,0)<br>GCP[ 1]: Id=2, Info=<br> (24000,1) -> (12.9457778570306,42.1574501849122,0)<br>GCP[ 2]: Id=3, Info=<br> (24000,24000) -> (12.773880153851,41.6326270994087,0)<br>
GCP[ 3]: Id=4, Info=<br> (1,24000) -> (12.0481891024801,41.7611321956389,0)<br>Metadata:<br> AREA_OR_POINT=Point<br> TIFFTAG_IMAGEDESCRIPTION=PAN<br> TIFFTAG_DATETIME=2002:10:24 10:52:26<br>Image Structure Metadata:<br>
INTERLEAVE=BAND<br>Corner Coordinates:<br>Upper Left ( 0.0, 0.0)<br>Lower Left ( 0.0,24000.0)<br>Upper Right (24000.0, 0.0)<br>Lower Right (24000.0,24000.0)<br>Center (12000.0,12000.0)<br>Band 1 Block=24000x128 Type=Byte, ColorInterp=Gray<br>
<br><br><br>What would the Proj4 string be in this case?<br><br>How to generalize to any type of imagery and using gdalinfo's output??<br><br>Thanks in advance<br><br><br>-- <br>Mattia