[gdal-dev] gdal_proximmity.py

Frank Warmerdam warmerdam at pobox.com
Thu Feb 25 10:02:04 EST 2010


Vincent Honnet wrote:
> Hi,
> 
> I'm trying to use gdal_proximity.py. through an installation of FWTools 
> 2.4.5 or 2.4.6.
> 
> The first thing is that there is, I think, a mistake at line 150: the 
> variable dst_ts is wrong, it should dst_ds, then the exception of the 
> try can set the right variable to None.
> 
> My command line is:
> gdal_proximity.py T:\vincent\tmp\SwissBoarder.tif 
> T:\vincent\tmp\test.tif -srcband 1 -of GTiff -values 255 -nodata 0 
> -distunits GEO -maxdist 100
> 
> that way, the result is:
> 
> Traceback (most recent call last):
>  File "c:\FWTools2.4.5\bin\gdal_proximity.py", line 171, in ?
>    gdal.ComputeProximity( srcband, dstband, options,
> AttributeError: 'module' object has no attribute 'ComputeProximity'
> 
> 
> Did someone use this command that way ? Is my command wrong ?

Vincent,

gdal_proximity requires the "next generation" python api. FWTools still
distributes the old python bindings for OpenEV compatability.  You will
need to use a different environment like OSGeo4W's "gdal-dev" package.

I have fixed the dst_ts thing in trunk now.

Best regards,
-- 
---------------------------------------+--------------------------------------
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