[gdal-dev] Using Python-GDAL to retrieve Projection information

Frank Warmerdam warmerdam at pobox.com
Tue Jun 29 05:46:42 EDT 2010


Kim,

You can use GetProjection() to fetch the coordinate system:

dataset = gdal.Open( input )
projection   = dataset.GetProjection()

The returned value is a string containing the WKT
description of the coordinate system.

Best regards,

On Tue, Jun 29, 2010 at 11:41 AM, Kim Besson <kimbesson1981 at gmail.com> wrote:
> Greetings
> I have been using Python GDAL to retrieve image size (XSize YSize) but now I
> need to retrieve Projection information in order to use in GDALWARP. Has
> anyone has an practical-example on how to use it?
> THanks
> Best regards,
> Kim
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent


More information about the gdal-dev mailing list