py-gdalogr-cookbook icon indicating copy to clipboard operation
py-gdalogr-cookbook copied to clipboard

buffer a geometry return None

Open epifanio opened this issue 9 years ago • 1 comments

Trying the python-gdal cookbook, exactly this step: https://pcjericks.github.io/py-gdalogr-cookbook/geometry.html#buffer-a-geometry

poly = pt.Buffer(bufferDistance)

returns: None

and: poly.ExportToWkt() Returns:

AttributeError: 'NoneType' object has no attribute 'ExportToWkt'

epifanio avatar Nov 23 '15 01:11 epifanio

What do you mean that poly = pt.Buffer(bufferDistance) returns None? The return value of the buffer operation is assigned the name poly. The buffer returns a geometry.

The code example works for me in both Python 2 and 3 (ignoring the print statement). GDAL==2.3.1

kannes avatar Jul 25 '18 12:07 kannes