Winnowing out collateral lines from a Tree

While thinking about a what a user was about to do sounded very familiar. It is probably a good exercise to create a standard workflow.

He wanted to trim out the unconnected people … which seems easy by either exporting the People → Relationship filters → People related to <Person> rule or excluding those people and deleting the remainder. The Disconnected People rule seem like it had potential but it only cleans singles, not clusters or trees that do not intertwine.

But also trimming back to direct descendants of forebears, seems easier than it is. It spotlighted that there are broad interpretations of what should be included.

He wanted all descendants of ancestors of a person. There are good rules (like Descendant family member of <filter>) that would do most of the job. But that <filter> would push through a lot of redundant work. And it would still miss the siblings of ancestors where the parents were unknown and step/half relatives from families that are blended at the top level.

So it probably needs to start with finding all the Ancestors of a person, then find the top border (the subset with zero parents), add their siblings and spouses. And use that superset to feed into that <filter>.

Unfortunately, the rule doesn’t exist to find the people with zero parents. So I’ll either use the very inefficient <filter> set … or … do the Zero parents stip with SuperTool. Something like:

# SuperTool script to find people with zero parents

def has_zero_parents(person):
    return len(person.get_parent_family_handle_list()) == 0

for person in db.iter_people():
    if has_zero_parents(person):
        result.add_row([person], obj=person)

Gramps is a great ancillary tool for cleaning up a Tree before sharing with relatives. It is free, flexible and has powerful topiary tools. But you have to put a lot of thought into where you cut.

I have two instances of an endline grandparent with a sibling. I have not found their parents. When finding the descendants to build out the tree the sibling and their descendants were excluded.

My simple fix was to add the siblings to the filter before finding descendants. This filter works off of the Active Person.

    <filter name="Y:ActivePerson" function="and"> <rule class="IsActivePerson" use_regex="False" use_case="False"> </rule> </filter>    <filter name="Family 1A: Select Ancestors of.... Active Person" function="and" comment="Ancestor of....">
      <rule class="IsAncestorOfFilterMatch" use_regex="False" use_case="False">
        <arg value="Y:ActivePerson"/>
      </rule>
    </filter>
    <filter name="Family 1A: Select Ancestors of.... Active Person" function="and" comment="Ancestor of....">
      <rule class="IsAncestorOfFilterMatch" use_regex="False" use_case="False">
        <arg value="Y:ActivePerson"/>
      </rule>
    </filter>
    <filter name="Family 1Aa All siblings" function="and" comment="Select siblings of Ancestors">
      <rule class="IsSiblingOfFilterMatch" use_regex="False" use_case="False">
        <arg value="Family 1A: Select Ancestors of.... Active Person"/>
      </rule>
    </filter>
    <filter name="Family 1B: Find their descendants...." function="or" comment="Descendants of....">
      <rule class="IsDescendantOfFilterMatch" use_regex="False" use_case="False">
        <arg value="Family 1A: Select Ancestors of.... Active Person"/>
      </rule>
      <rule class="IsDescendantOfFilterMatch" use_regex="False" use_case="False">
        <arg value="Family 1Aa All siblings"/>
      </rule>
      <rule class="MatchesFilter" use_regex="False" use_case="False">
        <arg value="Family 1A: Select Ancestors of.... Active Person"/>
      </rule>
      <rule class="MatchesFilter" use_regex="False" use_case="False">
        <arg value="Family 1Aa All siblings"/>
      </rule>
    </filter>

I then have filters to add in spouses and depending on the need in-law parents, siblings, previous marriages and any children from the previous marriages.

1 Like

I think that 3 new rules are needed:

A Family version of the People rule: HasCommonAncestorWith
2 People rules: to find people in <Family> and <Family filter>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.