gacarrillor / AppendFeaturesToLayer

QGIS Processing plugin to add an algorithm for upserting features from a source vector layer to an existing target vector layer.
23 stars 4 forks source link

Points no longer show up after updating existing feature #12

Closed cheetaha97 closed 1 year ago

cheetaha97 commented 1 year ago

I'm using this plugin to add addresses to an existing field in my layer. The points were all loaded in weeks ago with the "address" field left blank, and I am updating the "address" field as we get new batches of data (about a quarter of the points each time). I nearly got the result I was looking for, but had a hiccup at the end. When I appended the source layer to the target layer and selected "If duplicate is found, UPDATE existing feature", the addresses populated in the correct fields. But when I closed the attribute table, all of the updated points had disappeared from the map. Trying to select one in the attribute table and 'zoom to selection' gave me a "no extent could be determined" error. The points still had their latitude and longitude coordinates in the attribute table, but would no longer show up anywhere on the map. Updating the extents of geometry in the properties had no effect, and the CSV I used has no geometry (attribute only).

gacarrillor commented 1 year ago

Interesting! We could improve this behavior if you're willing to test a dev version I would send you (let me know in a comment below). If tests are OK, we'll publish a new plugin version for all users.

What's the issue The key is your last sentence: "[...] the CSV I used has no geometry [...]". In this case, "Append Features to Layer" is in fact updating your existing geometry with a NULL geometry coming from your alphanumeric CSV. I think the plugin shouldn't do that, and we can tell it not to.

cheetaha97 commented 1 year ago

I would be happy to test a dev version, yes! I had a feeling it was due to the CSV geometry.

gacarrillor commented 1 year ago

Great. This is the dev version you could test.

AppendFeaturesToLayer_1_3_0_dev.zip

If your use case is well supported by this dev version, we'll release a new official plugin version.

cheetaha97 commented 1 year ago

The dev version worked like a charm, thank you so much!

gacarrillor commented 1 year ago

Great! Thanks for testing it.