2

In ArcGIS, when I use the Raster to Polygon tool, I can set the Maximum vertices per polygon feature parameter, where the algorithm subdivides a polygon into smaller polygons. For example:

Raster to Polygon tool in ArcGIS with parameter for maximum vertices per polygon feature

The result of this process is shown below, where the attribute table contains a column called gridcode with the subdivision of the polygons.

Vector layer with the attribute table generated after the process

My problem is that I'm looking for an alternative to do that in QGIS, but I couldn't find any options for this. Does anyone know of any tool or plugin in QGIS for polygonizing rasters that would allow me to limit the vertices for each feature?

1 Answer 1

4

There is no option for limiting the number of vertices in the QGIS Polygonize (raster to vector) tool, but you can post-process the layer with the Subdivide tool https://docs.qgis.org/3.34/en/docs/user_manual/processing_algs/qgis/vectorgeometry.html#subdivide.

Subdivides the geometry. The returned geometry will be a collection containing subdivided parts from the original geometry, where no part has more than the specified maximum number of nodes.

This is useful for dividing a complex geometry into less complex parts, easier to spatially index and faster to perform spatial operations. Curved geometries will be segmentized before subdivision.

1
  • Thanks for your answer. I will try to post-process the layer as you suggested among other alternatives I thought of here. I will post the results later to help others with the same problem. Commented Sep 18 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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