Places database for Gramps

Wouldn’t it be nice to have pre-made territorial division of each country within Gramps?

Is there maybe a project already to create such databases?

I started working on one with Poland - it currently includes territorial division from a few sources:

  • division between 1919-08-14 and 1939-10-08 (pre-WW2) is taken from Wikipedia,
  • division between 1975-06-01 and 1998-12-31 (49 voviderships) is taken from Wikipedia,
  • division after 1999-01-01 (current one) is taken from TERYT database (publicly available data from polish gov),

Current version:

I didn’t created that manually, of course - this is a result of a few scripts which converted the database and web pages to Gramps format.

2 Likes

I don’t have a lot of places in Poland but I’ll try to load it to compare it with my places. It will be probably better.

There seem to be some regional Gazetteer collections. (Not designed for Gramps but created as general reference sites.)

I’ve built similar Place definition collections for my home US state, county and immediately adjacent counties. (My tree has morphed into more of a place study than a genealogy.) However, because of the Place Selection dialog only having a hierarchical option, it is less than optimal in practice. Perhaps if Gramps had an option to temporarily open Gazetteer .gramps Place files in parallel and drag into the main tree, such libraries would be more useful. Or perhaps if there was a Geography view styled Place Selector tool.

(In version one of Gramps, it operated directly from an XML file rather than using a database file. A ‘read-only’ modality based on that could be really useful for when you want to import/drag a small sub-selection from another dataset.)

If you only want few specific places, the import should be done by presenting you with a list when you add a place reference somewhere. It makes no sense to do the import separately in such case.

The databases could evolve into such system at some point, but we first need to have the databases.

I’ve put mine into a repository:

EDIT:
Related thread - with Gazetter links:

EDIT2:
I really like how Gramps select proper names of places and containing regions based on date of the event in which the place is used. That allows to create a database which properly includes all the historic variations. Great feature.

1 Like

There is an interface to the GOV gazetteer. The Addon GetGOV will import a location and all of the time varying hierarchy for it. It is europe-centric.

You enter the GOV id and the addon will add the hierarchy. The gramps id is the GOV id, so do not renumber the Places in gramps or that tie will be lost. The place type will be added from the gazetteer, so may not be a standard gramps-type.

2 Likes

I think a more general problem needs to be solved first. It is fairly easy to create a gramps database with nothing but places in it (let’s call it geography.gramps), and (when creating a new database), starting by importing geography.gramps.

But (let’s assume I’m working on the county of Norfolk in the UK) if I have a good database for Norfolk places, and start work on 2 separate trees, I might well add places to both trees.

There is no way I know of to keep a shared places database in sync.

Given such a feature, creating place databases is “just work”.

(Given the nature of the UK, almost any tree will have references to places in London. So a shared
London reference would almost always be useful)

BugBear

1 Like

I find keeping several historical territorial divisions very dificult to maintain. Personally I just keep the current territorial division in my database for the places I use.

I’d also try to avoid bloating Gramps with too many places, because the interface becomes slower if tens of thousands of places have to be loaded each time you want to select a place. If you want a large place database you could store them externally and just load the places needed into Gramps.

Just as an example, I uploaded all of the place data for Sweden from the GeoNames gazetteer. There were over 27,000 places in the hierarchy. The import process used the GeoNames ID for each place, so there is a unique key for merging, I think. But this is a lot of bloat for even this small case.

GeoNames only has the current place structure so there is no time-dependent info like in GOV gazetteer. An similar import from GOV might be significantly larger.

This is why I prefer a ‘upload as needed’ process rather than loading a large place database.

It sounds like this would make a very nice assortment of Gramplets.

maybe have a Gazetteer gramplet that could read in a locally (or URI) stored file in one of the typical Gazetteer data exchange formats and let the user find a subset of Place definitions to import. That might be a single location missing from your Tree or a filtered subset (like the only the European subset from TechSlides’ list of capitals of countries).

Lists are commonly available in JSON, CSV, Linked Places (LP) or LP-TSV.

If a Gramps exporter was written for Places, It might put out sharable place lists in Gramps XML format.

Having a Gramplet that let users cherry-pick a single Record (a Person/Family/Note/Citation/Place/Event with or without its secondary object dependencies) from a GEDCOM or .gramps/.gpkg would have a lot of a potential uses.

If you install the Isotammi addons it includes an option to only export the Place data ( see under the Material type section ) .

Also allows including a description field but normal Gramps does not see it, would be great if Gramps XML was updated in Gramps 5.2.x to support these extra field/options from Isotammi!

(Edit: created feature request 12546: Enhance Gramps XML to support “Description” field from Isotammi XML export(er) )

2 Likes

That does sound nice.

Too bad they didn’t add a similar option for “just Sources”. But you could always massively overload a dummy person to be a mule for smuggling Sources, Notes & such into another tree. Then export just the dummy person.

There isn’t an easy way to hang a ton of Places on a Dummy Person. The Isotammi exporter makes it possible another way.

More than a year later and I found the need to rough out a place list for the regions in of a country.

The quickest way turned out to involve pulling a list of top level administrative divisions of a county from a website and make a simple CSV list.

That list could be imported via the Import Text add-on gramplet in the Places category sidebar. Then the Isotammi MultiMerge add-on Gramplet was used to automerge any records with duplicate Place titles.

Here’s a sample of the UK Place CSV (which I have in a Note destined for the example.gramps file in the 5.2 version. It is a good hierarchical example because the UK is a political union containing Countries and the countries have shires/regions that are rarely seen in postal addresses.) :

Paste the content of this entire note  into the Import Text gramplet in the Places sidebar and click the "Import" button to quickly create a Geography View ready-to-plot set of pins for the United Kingdom.  

These leading "instructional" sentences will be utterly ignored.  The countries of the UK are divided  into sections... but that is just to make it easier for you to read, not to help the Importer. 

Place,name,enclosed_by,latitude,longitude,type
United Kingdom,United Kingdom,,54.75844,-2.69531,Political Union
Scotland,Scotland,United Kingdom,56,-4,Country
Wales,Wales,United Kingdom,52.5,-3.5,Country
England,England,United Kingdom,52.16045,-0.70312,Country

Place,name,enclosed_by,latitude,longitude,type
7,Buckinghamshire,England,51.75,-0.75,Shire
10,Cambridgeshire,England,52.333333,0.083333,Shire
13,Cornwall,England,50.416667,-4.75,Region
14,County Durham,England,54.666667,-1.75,Region
15,Derbyshire,England,53.166667,-1.583333,Shire
16,Devon,England,50.75,-3.75,Region
17,Dorset,England,50.75,-2.333333,Region
23,East Riding of Yorkshire,England,53.9112323,-0.5813105,Shire
25,Gloucestershire,England,51.8333313,-2.1666674,Shire
27,Hampshire,England,51.083333,-1.166667,Shire
28,Herefordshire,England,52.083333,-2.75,Shire
33,Kent,England,51.2474823,0.7105077,Region
36,Leicestershire,England,52.666667,-1,Shire
37,Lincolnshire,England,53.166667,-0.25,Shire
42,Norfolk,England,52.666667,1,Region
43,Northamptonshire,England,52.25,-0.833333,Shire
44,Northumberland,England,55.25,-2.000559,Region
45,Oxfordshire,England,51.833333,-1.25,Shire
51,Somerset,England,51.083333,-3,Region
58,Tyne and Wear,England,54.916667,-1.566667,Region
62,West Sussex,England,51,-0.416667,Region
64,Wiltshire,England,51.25,-1.916667,Shire

Place,name,enclosed_by,latitude,longitude,type
1,Aberdeenshire,Scotland,57.166667,-2.666667,Shire
2,Angus,Scotland,56.666667,-2.916667,Region
3,Argyllshire,Scotland,56.2517333,-5.2513764,Shire
4,Ayrshire,Scotland,55.5,-4.5,Shire
5,Banffshire,Scotland,57.5,-3.083333,Shire
6,Berwickshire,Scotland,55.75,-2.5,Shire
8,Buteshire,Scotland,55.75,-5.25,Shire
9,Caithness,Scotland,58.43027368,-3.464979482,Region
12,Clackmannanshire,Scotland,56.166395,-3.7513968,Shire
18,Dumfries and Galloway,Scotland,55.083333,-3.833333,Region
19,Dumfriesshire,Scotland,55.166667,-3.5,Shire
20,East Ayrshire,Scotland,55.5,-4.25,Shire
21,East Dunbartonshire,Scotland,55.933333,-4.2,Shire
22,East Lothian,Scotland,55.915797,-2.7511952,Region
24,Fife,Scotland,56.3333331,-3.0000001,Region
29,Highland,Scotland,57.5066357,-5.0038367,Region
30,Inverclyde,Scotland,55.9,-4.75,Region
31,Invernessshire,Scotland,57.083333,-4.666667,Shire
34,Kirkcudbrightshire,Scotland,55,-4,Shire
35,Lanarkshire,Scotland,55.5752966,-3.833333,Shire
39,Midlothian,Scotland,55.833333,-3.083333,Region
41,Moray,Scotland,57.416667,-3.25,Region
47,Perth and Kinross,Scotland,56.5,-3.75,Region
48,Renfrewshire,Scotland,55.833333,-4.5,Shire
49,Selkirkshire,Scotland,55.5,-3,Shire
50,Shetland Islands,Scotland,60.333333,-1.333333,Region
52,South Lanarkshire,Scotland,55.5831634,-3.8332212,Shire
53,Stirlingshire,Scotland,56.0701208,-3.9087351,Shire
54,Strathclyde Region,Scotland,56,-5.166667,Region
55,Sutherland,Scotland,58.2500999,-4.5000946,Region
56,Tayside Region,Scotland,56.416667,-3.533333,Region
57,The Scottish Borders,Scotland,55.583333,-2.833333,Region
59,West Dunbartonshire,Scotland,55.966667,-4.533333,Shire
61,West Lothian,Scotland,55.916667,-3.5,Region
63,Western Isles,Scotland,57.666667,-7.166667,Region

Place,name,enclosed_by,latitude,longitude,type
11,Cardiganshire,Wales,52.25,-4,Shire
26,Gwent,Wales,51.6666717,-3.000007,Region
32,Isle of Anglesey,Wales,53.25,-4.333333,Region
38,Mid Glamorgan,Wales,51.5,-3.45,Region
40,Monmouthshire,Wales,51.7501058,-2.8333331,Shire
46,Pembrokeshire,Wales,51.8339209,-4.916667,Shire
60,West Glamorgan,Wales,51.583333,-3.75,Region