2

Does a procedure like Polygonize raster to vector exist in QGIS that can do the following:

I have a raster image, a shapefile (.shp) with all the regions of interest and I need a vector output with those polygons only.

  • 1
    In QGIS from the menubar: Raster > Conversion > Polygonize (Raster to vector), this allows you to both polygonize and clip your raster to a region of interest using your shapefile. – Joseph Dec 7 '16 at 10:28
  • Thank you for the answer @Joseph, do you mean the mask option?It does not allow me to enter a shapefile there .shp. As a matter of fact i just saw behind the window there is a message "TypeError: 'unicode' object is not callable". maybe you know something about this error? Does it take a shapefile if the error did not exist? – ODstuck Dec 7 '16 at 10:33
  • @ODstuck - Apologies, the term mask is also used for vectors for other tools (annoying!). In which case, you could use the Clipper tool and then the Polygonize tool. – Joseph Dec 7 '16 at 10:40
  • I believe that Clipper tool outputs a raster again? It has a mask option yes, and this inputs shapefiles, but still, how does this assist then the Polygonize tool? – ODstuck Dec 7 '16 at 10:48
  • 3
    You use the Clipper tool with the shapefile as the mask to output a raster showing your region of interest. You then use this output as the input to the Polygonize tool (no need to use a mask). This will produce a vector output of your clipped raster. – Joseph Dec 7 '16 at 13:19
1

As @Joseph correctly stated, the closest to my need is as he suggests:

You use the Clipper tool with the shapefile as the mask to output a raster showing your region of interest. You then use this output as the input to the Polygonize tool (no need to use a mask). This will produce a vector output of your clipped raster.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.