Skip to content

Commit af777f8

Browse files
committed
v0.2.6.8
1 parent 3f1e04f commit af777f8

File tree

13 files changed

+306
-134
lines changed

13 files changed

+306
-134
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ python3 gedcom-to-map.py /users/darren/documents/myhertitagetree.ged myTree -mai
6060
```
6161

6262
## GUI
63-
![img](docs/img/GUI-python_2025-09-03.png)
63+
![img](docs/img/GUI-python_2025-09.gif)
6464

6565
To use the GUI version, click on `Input File` and select your .ged file.
6666
Set your options in the GUI interface
@@ -242,6 +242,9 @@ python3 ..\gedcom-to-map\gedcom-to-map.py input.ged output -main "@I0000@" -form
242242

243243
* HTML Output : [docs/output.html](docs/output.html)
244244

245+
### Other sample GED files:
246+
- https://github.com/findmypast/gedcom-samples
247+
245248
## TODO
246249
- Add a treed hierarchy selector to enable people as groups and add expand/collapse to navigation
247250
- more troubleshooting on the address lookup
@@ -268,6 +271,17 @@ python3 ..\gedcom-to-map\gedcom-to-map.py input.ged output -main "@I0000@" -form
268271
- Need to separate the Load and GPS resolve steps (currently reloads after 30 seconds of looking up values)
269272

270273
## Releases
274+
### v0.2.6.8
275+
- Enriched Balloon in KML with proper linked to children and parents
276+
- Add folders to KML
277+
- Add children to Person Dialog
278+
- Add age checking (problems flag in yellow for the lineage people)
279+
- Dynamic KML/HTML options
280+
- Refractored long standing inconsistancy related to drawing the first person in KML
281+
### v0.2.6.7
282+
- Added FlyTo, Line Weigth & Trace cmdline to configuration
283+
- Input/Output as Buttons
284+
- Updates Samples output
271285
### v0.2.6.6.x
272286
- Working on KML functions and reworking GUI.
273287
- Fix HTML to use markers properly, optional timeline in KML

docs/img/GUI-python_2025-09-03.png

-105 KB
Binary file not shown.

docs/img/GUI-python_2025-09.gif

318 KB
Loading

docs/tips-ideas.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# Age warnings - Yellow tag
2+
When you see people in your lineage with yellow, it means they did not pass the ages tests. This includes the following:
3+
- As a [Mother](https://www.oldest.org/people/mothers/) they are too old or young or negative
4+
- As a [Father](https://www.guinnessworldrecords.com/world-records/oldest-father-) they are too old or young or negative
5+
- As a [person](https://en.wikipedia.org/wiki/List_of_the_verified_oldest_people) they are too old or young or negative
6+
7+
See [GedcomParser.py](../gedcom-to-map/gedcom/GedcomParser.py) for age range variables.
8+
19
# KML Mode
210
KML mode has two approaches to generating KML for your GED family. The first is Native which assuming that you have GPS positional values in your GED file. This is done using PLAC with a _LATI and _LONG (or LATI and LONG) attributes
311

@@ -32,7 +40,7 @@ $n
3240

3341
# TODO List
3442
- Add more details in description of people panel, ~~including age~~
35-
- for sorting of last name in Folium fold case, remove of punction and think about soundex match option
43+
- for sorting of last name in Folium fold, remove of punction ~~and think about soundex match option~~
3644
- Add mother and father to legend
3745
- fix missing relationship in people
3846
- add more detail in the KML version

gedcom-to-map/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Constants for gedcom-to-visualmap
22

3-
VERSION = "0.2.6.6.1"
3+
VERSION = "0.2.6.8"
44
NAME = "gedcom-to-visualmap"
55
GEOCODEUSERAGENT = NAME + "/" + VERSION + " GEDCOM-to-map-folium"
66
GUINAME = 'GEDCOM Visual Map'

gedcom-to-map/gedcom/GedcomParser.py

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@
2727

2828
addrtags = ('ADR1', 'ADR2', 'ADR3', 'CITY', 'STAE', 'POST', 'CTRY')
2929

30+
maxage = 122 # https://en.wikipedia.org/wiki/List_of_the_verified_oldest_people
31+
maxmotherage = 66 # https://www.oldest.org/people/mothers/
32+
maxfatherage = 93 # https://www.guinnessworldrecords.com/world-records/oldest-father-
33+
minmother = 11
34+
minfather = 12
35+
36+
3037
thisgvOps = None
3138

3239
def getgdate (gstr):
@@ -67,6 +74,54 @@ def getplace(gedcomtag : Record, placetag ="PLAC"):
6774

6875
return None
6976

77+
def CheckAge(humans: Dict[str, Human], thisXrefID ):
78+
""
79+
problems :list[str] = []
80+
if humans[thisXrefID]:
81+
thishuman = humans[thisXrefID]
82+
born = None
83+
died = None
84+
if thishuman.birth:
85+
born = thishuman.birth.whenyearnum()
86+
if thishuman.death:
87+
died = thishuman.death.whenyearnum()
88+
if born and died:
89+
if died < born:
90+
problems.append("Died before Born")
91+
if died - born > maxage:
92+
problems.append(f"Too old {died - born} > {maxage}")
93+
if thishuman.children:
94+
for childId in thishuman.children:
95+
if humans[childId]:
96+
child = humans[childId]
97+
if child.birth and child.birth.whenyearnum():
98+
if born:
99+
parentatage = child.birth.whenyearnum() - born
100+
if thishuman.sex == "F":
101+
if parentatage > maxmotherage:
102+
problems.append(f"Mother too old {parentatage} > {maxmotherage} for {child.name} [{child.xref_id}]")
103+
if parentatage < minmother:
104+
problems.append(f"Mother too young {parentatage} < {minmother} for {child.name} [{child.xref_id}]")
105+
106+
if died and died < parentatage:
107+
problems.append(f"Mother after death for {child.name} [{child.xref_id}]")
108+
elif thishuman.sex == "M":
109+
if parentatage > maxfatherage:
110+
problems.append(f"Father too old {parentatage} > {maxfatherage} for {child.name} [{child.xref_id}]")
111+
if parentatage < minfather:
112+
problems.append(f"Father too young {parentatage} < {minfather} for {child.name} [{child.xref_id}]")
113+
114+
# Birth after father dies within a year
115+
if died and died+1 < parentatage:
116+
problems.append(f"Father after death for {child.name} [{child.xref_id}]")
117+
else:
118+
if parentatage > max(maxfatherage,maxmotherage):
119+
problems.append(f"Parent too old {parentatage} > {max(maxfatherage,maxmotherage)} for {child.name} [{child.xref_id}]")
120+
if parentatage < min(minmother, minfather):
121+
problems.append(f"Parent too young {parentatage} < {min(maxfatherage,maxmotherage)} for {child.name} [{child.xref_id}]")
122+
123+
return problems
124+
70125
class GetPosFromTag:
71126
""" build an LifeEvent, but also return the other attributes """
72127
def __init__(self, gedcomtag : Record, tag : str, placetag ="PLAC"):
@@ -284,7 +339,7 @@ def __create_human(record: Record) -> Human:
284339
@staticmethod
285340
def __create_humans(records0) -> Dict[str, Human]:
286341
global thisgvOps
287-
humans = dict()
342+
humans : Dict[str, Human] = dict()
288343
thisgvOps.step("Reading GED", target=(thisgvOps.totalGEDpeople+thisgvOps.totalGEDfamily))
289344
for record in records0("INDI"):
290345
if thisgvOps.ShouldStop():
@@ -323,9 +378,10 @@ def __create_humans(records0) -> Dict[str, Human]:
323378
continue
324379
if husband:
325380
humans[chil.xref_id].father = husband.xref_id
326-
381+
humans[husband.xref_id].children.append(chil.xref_id)
327382
if wife:
328383
humans[chil.xref_id].mother = wife.xref_id
384+
humans[wife.xref_id].children.append(chil.xref_id)
329385
else:
330386
_log.warning("Family has missing INDI record for one of the CHIL: %s", record.xref_id)
331387

0 commit comments

Comments
 (0)