3

In QGIS 3 does anyone know how to copy the geometry of one feature and paste it into another selected feature to just override the geometry? Within postgis I did this with an update, but I'm looking for a visual way in QGIS. Simply copy and paste. The only solution I found, is to insert the copy of a feature as a new entry, edit the missing attributes and delete the old one.

  • Are you looking to script this or are you after an existing tool/workflow? Is this for only one feature selected interactively or for all features in a layer? – Michael Stimson Oct 1 '18 at 11:09
  • I'm looking for a most easy workflow just to change the geometry of one selected feature. To do this with the edit toolbar 'copy' and then 'paste' with a selected feature adds just a new entry and doesn't overrides it. – Michael Oct 1 '18 at 11:21
  • No, not really. The question of the first one seems to go into my direction, but the answer explains the insert of a copy as a new feature. The second one is to merge two layers together where to take the attributes from one layer and the geometry of another. – Michael Oct 1 '18 at 11:54
  • 1
    It sounds like you've already found the easiest way to do this. To simplify any further, you would have to code an entirely new tool. – csk Oct 1 '18 at 17:11
3

Geometry paster

Turns out we had a task for this too, so here we go:

  • Hallo Maxim, great work! Tested today the plugin. Does exactly what I was looking for. I like the integration in the edit-menu. Fits perfect there. Many many thanks. – Michael Dec 20 '18 at 21:25
2

not so visual, but it works

  1. Select feature, copy it
  2. Paste in a text doc, remove all except WKT geom
  3. Add stuff around your WKT: geom_from_wkt('YOUR WKT GEOM HERE')
  4. Select feature to replace geometry
  5. Use resulting line in Field calculator to replace geometry with a new one (text from 3)
  • Hi Maxim, thanks for this suggestion. I‘ll give it a try. Maybe next year with a little more spare time I wanna have a closer look at the plugin development. I‘m shure it should be possible with that. – Michael Dec 8 '18 at 13:45

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.