[gdal-dev] raster extents and Python API

Kralidis,Tom [Ontario] Tom.Kralidis at ec.gc.ca
Wed Sep 23 08:04:52 EDT 2009


Hi,

Using the Python API, I am writing a script to get high level
information on datasets to feed metadata and publishing.

When fetching extents, osgeo.ogr has GetExtent().

Doesn't look like there is anything like this within osgeo.gdal (thanks
crschmidt).  One would have to call GetGeoTransform() and do the math by
hand against the origin, pixel size and rows/cols to derive the extent.

Wouldn't a osgeo.gdal GetExtent() enhancement be valuable?  This would
save developers from calculating this by hand, and I'm guessing this is
already done somewhere in the codebase, seeing that gdalinfo outputs
extents.

..Tom




More information about the gdal-dev mailing list