1

I have a layer with lines - I export it qith QGIS to a new geopackage. A second layer with the same table structure but containing polygons should go into the same geopackage and preferably into the same layer. When i go on Export, select the geopackage and type in the same layer name as before, it asks me if i want to: Overwrite File, Overwrite Layer, Append to Layer or Cancel. I pick "Append to layer" but the result does not contain the polygons. Am i doing something wrong or is this a bug?

2
  • well, QGIS splits the layer again into layers according to their geometry. I want them in one layer as the come from one and the same MapInfo .Tab file. But if there is no other way i can save them "splitted" into one gpkg, was just wondering why it is offering me the "append to layer" option then – sn1ks Oct 16 '19 at 12:43
  • 2
    The "append layer" let you add more line to your line layer (for exemple if you get a new line layer that you want to add to an already existing line layer) – J.R Oct 16 '19 at 12:52
1

Depend on what your future use is but mixing geometry is generally not good practice (for exemple QGIS and Arcmap cant use layer with mixed geometry).

For your specific problem I think it came from the type of geometry of your line layer, when you export it you have the option to choose the geometry type (Automatic, Point, Linestring, polygon, GeometryCollection or No Geometry), if you let it as Automatic (the default) or choose linestring it is set as linestring and you cant add another type of geometry.

You should try to export again your line layer with the Geometry type : GeometryCollection then try to add your polygon.

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.