Given a topographic raster tif of an european country where elevations are simplyfied to either 0, either 200.
How to create a polygon ?
Comment: With the following polygonize.py command:
gdal_polygonize.py level200.tif -f "ESRI_Shapefile" level200.shp
I get to following error:
Creating output level200.shp of format ESRI_Shapefile.
Traceback (most recent call last):
File "/usr/bin/gdal_polygonize.py", line 164, in <module>
dst_ds = drv.CreateDataSource( dst_filename )
AttributeError: 'NoneType' object has no attribute 'CreateDataSource'
Best Answer
AttributeError: 'NoneType' object has no attribute 'CreateDataSource'
means the format-f
is incorrect.ESRI Shapefile
(no underscore).Try without underscore:
gdal_polygonize.py level200.tif -f "ESRI Shapefile" level200.shp
it works. :)