7

How can I convert features of a layer from POLYGON to MULTIPOLYGON? I know how to do that using the postgis function ST_Multi but how could I do to same thing for a layer in QGIS?

  • Seems to be a comment please expand on what your are asking – Mapperz May 13 '15 at 14:57
7

If you want to do it based on a field, you can do this in QGIS from the menu: Vector-->Geometry Tools-->Singleparts to Multipart (requires at least two poylgons to share an attribute that you specify).

There is a more direct equivalent to ST_Multi in OGR. I didn't find a way to access this specific OGR functionality through QGIS, but that could be done using GDAL/OGR like this ogr2ogr -nlt MULTIPOLYGON multipolygon_output.shp polygon_input.shp More details on -nlt switch are available on the ogr2ogr page.

| improve this answer | |
  • I mamanged to do it with GDAL/OGR as you said, thanks. Let's see if someone can find a solution to this directly in QGIS. – Egidi May 14 '15 at 13:17
  • 1
    In QGIS 3 the tool is now called "Collect geometries" – Jonathan Sep 7 at 16:19
0

While still waiting for the simple QGIS solution you can have a look at how it goes with OpenJUMP through the right-click menu:

enter image description here

| improve this answer | |

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.