Taapeli / isotammi-addons

Gramps addons for Isotammi project / Isotammen Gramps-lisäosia
11 stars 3 forks source link

Multimerge of Places can enclose the Primary object with itself #25

Closed emyoulation closed 6 months ago

emyoulation commented 11 months ago

The only native way to delete a hierarchical branch of places is delete the lowest levels and delete them. Then delete the next lowest level.

With multimerge, you can collapse a hierarchy by selecting the whole branch by merging to a single Primary object. Then delete that object. Except that it requires the extra step of eliminating the Enclosing levels.

With the example.gramps tree, in the Place (flat list) category, apply the follow filter: image

Add the MultiMergeGramplet Select All places in the View Merge selected objects; select P0441: Greece the primary object; click ok Edit the resulting P0441

In the Enclosed by, it lists P0441 itself image

This seriously confuses the Groups Places view too

kkujansuu commented 11 months ago

Yes, this problem should be fixed. I shall take a look at it. Thanks again.

pe 29. jouluk. 2023 klo 0.29 Emyoulation or BAMaustin ( @.***) kirjoitti:

The only native way to delete a hierarchical branch of places is delete the lowest levels and delete them. Then delete the next lowest level.

With multimerge, you can collapse a hierarchy by selecting the whole branch by merging to a single Primary object,

With the example.gramps tree, in the Place (flat list) category, apply the follow filter: image.png (view on web) https://github.com/Taapeli/isotammi-addons/assets/69127217/5e3b9aea-4a86-47ad-855a-91ba73de3538

Add the MultiMergeGramplet Select All places in the View Merge selected objects; select P0441: Greece the primary object; click ok Edit the resulting P0441

In the Enclosed by, it lists P0441 itself image.png (view on web) https://github.com/Taapeli/isotammi-addons/assets/69127217/effa5480-a36c-4441-a2c0-9b8787398a14

— Reply to this email directly, view it on GitHub https://github.com/Taapeli/isotammi-addons/issues/25, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIYOXRUPCK6I7OFF3KX3BLYLXXDHAVCNFSM6AAAAABBF6V6RKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA2TQOJQGA3DEOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

kkujansuu commented 11 months ago

A simple way to fix this is to prevent merges if there is even one place that (directly or indirectly) contains another place.

This would prevent collapsing a hierarchy with this tool. Is that a useful functionality? I think that in that case PlaceUpdate (or Isotammi PlaceTool) could be used to first remove any unneeded surrounding places.

emyoulation commented 11 months ago

Please don't prevent merges in that way. That would cripple the value for pruning the Place tree. (Because, YES!, collapsing a branch of Places is very useful.)

Although I had not thought of testing selecting a Place lower in the Tree hierarchy as the Primary in the Merge. That could become ugly indeed. I'll do some testing.

A 'warn' instead of a 'forbid' would be more desireable. The manual cleaning of the 'Enclosed By' list and References isn't that difficult for a single resulting Place.

kkujansuu commented 11 months ago

I think I can change Multimergegramplet so that it avoids the problem but still allows collapsing a branch.

By the way, why would collapse a branch? In what kind of a use case?

emyoulation commented 11 months ago

The use case is for sharing a pre-populated place tree with various local Historical Societies.

There's no way to export a subset of Places and all their secondary objects. (Including the Historical Society as a "Repository" containing their library of Local History books as Sources which are linked to the authors.) So I start with my main Tree and trim away the irrelevant bits

The idea is to collaborate with the Historical Societies to build a "Starter's Kit" for new local genealogists. GEDCOM 5.5.1 is too weak in Place & Source data. That leaves Gramps XML as the only way to share a common base tree. At least until GEDCOM7 hits critical mass.

My benefit is that the Historical Society validates my local Place list, adds all the defunct Cemeteries & Historical Place names. And, they will expand out what they consider their key reference materials.

Eventually, I'd like to have a research request form that can be imported. (Been working on polling & populating standard genealogy fillable PDF forms. Such as the ones in https://github.com/emyoulation/example-Gramps-Trees/tree/main/Fillable_PDF_forms ) And a report that can be generated to be sent to the requestor.

kkujansuu commented 11 months ago

After the merge the remaining place has all the other place names in the "alternate names" list. Is that ok?

ma 1. tammik. 2024 klo 22.34 Emyoulation or BAMaustin < @.***> kirjoitti:

The use case is for sharing a pre-populated place tree with various local Historical Societies.

There's no way to export a subset of Places and all their secondary objects. (Including the Historical Society as a "Repository" containing their library of Local History books as Sources which are linked to the authors.) So I start with my main Tree and trim away the irrelevant bits

The idea is to collaborate with the Historical Societies to build a "Starter's Kit" for new local genealogists.

My benefit is that the Historical Society validates my local Place list, adds all the defunct Cemeteries & Historical Place names. And, they will expand out what they consider their key reference materials.

Eventually, I'd like to have a research request form that can be imported. (Been working on polling & populating standard genealogy fillable PDF forms. Such as the ones in https://github.com/emyoulation/example-Gramps-Trees/tree/main/Fillable_PDF_forms ) And a report that can be generated to be sent to the requestor.

— Reply to this email directly, view it on GitHub https://github.com/Taapeli/isotammi-addons/issues/25#issuecomment-1873470697, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIYOXRNU4CNSJTBVSHPZFDYMMMU5AVCNFSM6AAAAABBF6V6RKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZTGQ3TANRZG4 . You are receiving this because you commented.Message ID: @.***>

emyoulation commented 11 months ago

the remaining place has all the other place names in the "alternate names" list

That seems ideal. That list is easily 'cleaned' if needed.

The References that are enclosed Places are also easily removed from the merged one. Notes & Event references are a little more painful to remove.

kkujansuu commented 11 months ago

This sounds like you want to delete the places in the branch - not merge them. Maybe a dedicated tool or a Supertool script could do this better?

ma 1. tammik. 2024 klo 22.54 Emyoulation or BAMaustin < @.***> kirjoitti:

the remaining place has all the other place names in the "alternate names" list

That seems ideal. That list is easily 'cleaned' if needed.

The References that are enclosed Places are also easily removed from the merged one. Notes & Event references are a little more painful to remove.

— Reply to this email directly, view it on GitHub https://github.com/Taapeli/isotammi-addons/issues/25#issuecomment-1873476665, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIYOXWDDWYZXVIGYDGSI6DYMMO7XAVCNFSM6AAAAABBF6V6RKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZTGQ3TMNRWGU . You are receiving this because you commented.Message ID: @.***>

emyoulation commented 11 months ago

That's just my most recent use case.

Collapsing branches has also been helpful for mapping overly precise data. I have used it when consolidating pins (using a duplicate of the tree, of course) on maps. I might be interested in see detailed pins for 3 neighboring townships. But want to have the rollover be for Everything in neighboring townships. So merging all the localities, village, hamlets, farms, buildings in each adjacent township makes the rollover context menus for single pins more useful and simplifies the map without losing pins on the focal townships.

kkujansuu commented 11 months ago

Fixed in commit 63751419bae4e9f2d2ffc7d8ca67bcdedfe28dda. Multimergegramplet does not create a place hierarchy loop anymore.