1

enter image description here

On page 315 in QGIS training manual (using QGIS 2.18) I am attempting to use the Polygonize from raster to vector tool to vectorize my raster (of forest strands) to polygons for Exercise 14.3.2, I am unable to do this.

An error message keeps popping up when I try and use the tool;

Error 1: Failed to create directory rautjarvi_green_polygon for shapefile datastore. Traceback (most recent call last): File "C:\PROGRA~1\QGIS~1.18\bin\gdal_polygonize.py", line 197, in dst_layer = dst_ds.CreateLayer(dst_layername, geom_type=ogr.wkbPolygon, srs = srs ) AttributeError: 'NoneType' object has no attribute 'CreateLayer'

The raster layer has band values of zero where there is no information (no forest boundary). Would this possibly be the cause of the issue, as polygons are only needed for the forest boundary?

  • 2
    I think you need to specify the output file in a better way, by "selecting" a file, despite it does not exist. I guess the problem is because no file is created the way you are trying. Give a try to something like C:\Users\...\rautjarvi_green_polygon.shp in the last argument of the command – Marco Jan 2 '18 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.