0

I have generated several bathymetry layers using the contour plugin. These are saved in memory. I have installed the memorylayer saver plugin which recognises the layers concerned. When I try to make the layer permanent I get the error below.

How can I make these layers permanent?

Could not make temporary scratch layer permanent. Error: Feature write errors: Feature creation error (OGR error: Cannot insert feature with geometry of type GEOMETRYCOLLECTION in column GEOMETRY. Type MULTIPOLYGON expected) Feature creation error (OGR error: Cannot insert feature with geometry of type GEOMETRYCOLLECTION in column GEOMETRY. Type MULTIPOLYGON expected) Only 8 of 10 features written.


QGIS version 3.18.1-Zürich

I've removed the plugins as they may be the problem. However, I cannot see a suitable built in contour tool as when I search contour I only get Raster or Mesh tools and my source is a file of points. That's why I installed the plugin. I have successfully worked with contours from raster files.

What tool should I use?

Perhaps there is an intermediate step.

contour tools seen


This now works. I've upgraded to 3.18.3 and re-installed the Contours plugin. The contours generated in memory can now be saved. I'm not sure what was wrong but it now works.

7
  • 5
    please add tags and add to your question which program/version you are using
    – sn1ks
    May 31 '21 at 7:47
  • 3
    Usually you should be able to either right click the layer and choose save as or directly save to a file output in a tool. Never heard about a memorylayer saver plugin, is there a specific reason why you use this? Btw, you say contour plugin: are you talking about the native processing tool or is it indeed an extra plugin?
    – MrXsquared
    May 31 '21 at 18:58
  • 2
    Your question does not include which version of QGIS you're working in. We're asking because as you guessed, we regularly do what you're trying to do and encounter no problem. You don't need a plugin to make a temporary layer permanent. In current versions, just right-click the layer and click Make permanent. Second question, why are you using a contour plugin and not the built-in QGIS or GRASS tools?
    – Gabriel
    May 31 '21 at 19:03
  • 1
    In case your comment about how complicated it ist to just save someting is refering to my answer: no, you're right, normally, it shouldn't. But as the error-messages you posted indicate, something is wrong with your layers - and the error message is quite explicit here: Cannot insert feature with geometry of type GEOMETRYCOLLECTION in column GEOMETRY. Type MULTIPOLYGON expected. So that's why you have to take this detour, to save your work. However, we all here don't know how (and why) you got there. If you use the GDAL contour tool (Menu Processing / Toolbox), all should be fine.
    – Babel
    May 31 '21 at 19:25
  • 2
    When you use the term "contours", it refers to raster layer. What you want seems more to be a concave or convex hull, see: docs.qgis.org/3.16/en/docs/user_manual/processing_algs/qgis/… and docs.qgis.org/3.16/en/docs/user_manual/processing_algs/qgis/… - so that's why it is so important to give as many information in your question as possible, otherwise, you won't get help. Please update your question: screenshot of what you've done, what you want to achieve and where you stuck
    – Babel
    Jun 1 '21 at 7:20
2

Create a new, empty multipolyon layer. Copy all features from your temporary layer and paste it to this empty layer.

Another option is the tool Menu Processing / Toolbox / Promote to Multipart or Menu Processing / Toolbox / Collect Geometries.

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