10

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?

1
  • Seems to be a comment please expand on what your are asking
    – Mapperz
    Commented May 13, 2015 at 14:57

2 Answers 2

9

If you want to do it based on a field, you can do this in QGIS from the menu: Vector --> Geometry Tools --> Collect Geometries (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.

2
  • 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
    Commented May 14, 2015 at 13:17
  • 2
    In QGIS 3 the tool is now called "Collect geometries"
    – Jonathan
    Commented Sep 7, 2020 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

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.