bartfeenstra / betty

Betty visualizes and publishes your family history by building interactive, encyclopedia-like genealogy websites out of your Gramps and GEDCOM family trees
https://betty.readthedocs.io
GNU General Public License v3.0
72 stars 10 forks source link

Places : Place type not captured #640

Closed unixmiddleware closed 2 weeks ago

unixmiddleware commented 3 years ago

With regards places, unless I'm mistaken (always possible) the 'type' of place isn't captured in _parse_place. The element that's passed has the attributes shown in the attached png file. If I'm right, and it's not captured elsewhere, would you mind adding it please? The reason I want it is because, using nominatim, there are 10 Irelands!

0, type: administrative, display_name: Éire / Ireland 1, type: island, display_name: Ireland 2, type: hamlet, display_name: Ireland, Old Warden, Central Bedfordshire, East of England, England, SG17 5QL, United Kingdom 3, type: hamlet, display_name: Ireland, Dubois County, Indiana, 47545, United States of America 4, type: hamlet, display_name: Ireland, Lewis County, West Virginia, 26376, United States of America 5, type: hamlet, display_name: Ireland, Bigton, Shetland Islands, Scotland, ZE2 9JA, United Kingdom 6, type: hamlet, display_name: Ireland, Coryell County, Texas, United States of America 7, type: isolated_dwelling, display_name: Ireland, Balhall, Angus, Scotland, DD9 7UL, United Kingdom 8, type: hamlet, display_name: Ireland, Athens County, Ohio, United States of America 9, type: hamlet, display_name: Ireland, Landaff, Grafton County, New Hampshire, United States of America

I want to refine the nominatim query to say type 'island' when the gramps attribute is 'Country', and probably similar for other gramps place types. place-type

bartfeenstra commented 3 years ago

Thanks for opening this issue! It's something I've wanted to add to Betty, but don't really know how to solve well. contemporary addresses are difficult enough (a common problem in e-commerce software), but for software that must be able to handle historical place descriptions and describe these in contemporary concepts, that's an even harder problem to solve.

Examples

I hope these examples illustrate how introducing place types across jurisdictions and time is not an easy thing to get right, especially because the kind of service you are trying to integrate Betty with (and other developers might want to integrate Betty with in the future) expects some unified form of classifying places.

Proposal

I do believe there may be a few concepts common across the world that we can start with:

bartfeenstra commented 2 weeks ago

@unixmiddleware I just opened https://github.com/bartfeenstra/betty/issues/640 which should add everything to load Gramps' built-in place types as well as allow users to override or extend this default mapping.