[gdal-dev] Generic way to extract Projection & CRS Information from
raster imagery
mattia
mattia.parigiani at gmail.com
Mon Mar 17 15:05:02 EDT 2008
Hi Folks,
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..
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..
For example, I have a SPOT image with the following gdalinfo output:
Driver: GTiff/GeoTIFF
Files: IMAGERY.TIF
Size is 24000, 24000
Coordinate System is `'
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"]]
GCP[ 0]: Id=1, Info=
(1,1) -> (12.2141588220865,42.2864439118571,0)
GCP[ 1]: Id=2, Info=
(24000,1) -> (12.9457778570306,42.1574501849122,0)
GCP[ 2]: Id=3, Info=
(24000,24000) -> (12.773880153851,41.6326270994087,0)
GCP[ 3]: Id=4, Info=
(1,24000) -> (12.0481891024801,41.7611321956389,0)
Metadata:
AREA_OR_POINT=Point
TIFFTAG_IMAGEDESCRIPTION=PAN
TIFFTAG_DATETIME=2002:10:24 10:52:26
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0,24000.0)
Upper Right (24000.0, 0.0)
Lower Right (24000.0,24000.0)
Center (12000.0,12000.0)
Band 1 Block=24000x128 Type=Byte, ColorInterp=Gray
What would the Proj4 string be in this case?
How to generalize to any type of imagery and using gdalinfo's output??
Thanks in advance
--
Mattia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080317/86b8e598/attachment.html
More information about the gdal-dev
mailing list