[FWTools] Gdal and ecw [SEC=UNCLASSIFIED]

Frank Warmerdam warmerdam at pobox.com
Tue Aug 22 10:13:02 EDT 2006

Laurence-Rogers, Ben wrote:
> Hi list,
> Newbie question - I want to be able to write a python script to read the 
> header information from ecw files.  I have downloaded the ecw sdk but 
> don't know what to do next - the format help says you need to link the 
> libraries, does that mean compiling gdal from scratch?


The FWTools binaries include support for ECW.  You should be able to write
a python script using FWTools without ECW related problems (I hope).

A very minimal example script to get you started would be:

import gdal

ds = gdal.Open( 'wrk.ecw' )
gt = ds.GetGeoTransform()
print 'GeoTransform = ', gt
ds = None

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    | President OSGF, http://osgeo.org

More information about the FWTools mailing list