py-gdalogr-cookbook
py-gdalogr-cookbook copied to clipboard
buffer a geometry return None
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'
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