[gdal-dev] Geometry.Within error

Frank Warmerdam warmerdam at pobox.com
Mon Mar 8 19:39:42 EST 2010

Spencer Gardner wrote:
> I'm writing a script that tests whether a feature lies completely within features of another layer.  When the script runs, it gives me the following error:
> Traceback (most recent call last):
>   File "landuse.py", line 82, in <module>
>     if landGeom.Within(bufferGeom):
> AttributeError: 'NoneType' object has no attribute 'Within'
> I don't know Python well enough to know exactly what that error is telling me.  I was able to run the script several days ago without problems and don't remember making any significant modifications since that time.  In the meantime, I have received an update to OGR.  Could this be a bug introduced by the update?


It is indicating that for some reason landGeom is None, the null value
for python.  I don't see anything odd about the script so perhaps there
are actually features in this dataset that are null.

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