# Gramps vs. PostGIS vs. SpatialLite

**URL:** <https://gramps.discourse.group/t/gramps-vs-postgis-vs-spatiallite/5345>\
**Category:** Ideas\
**Tags:** uuid\
**Created:** [April 27, 2024, 3:13pm UTC](https://gramps.discourse.group/t/gramps-vs-postgis-vs-spatiallite/5345 "2024-04-27T15:13:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![StoltHD](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@StoltHD](https://gramps.discourse.group/u/StoltHD)\
**Post date:** [April 27, 2024, 3:13pm UTC](https://gramps.discourse.group/t/gramps-vs-postgis-vs-spatiallite/5345/1 "2024-04-27T15:13:45Z")

</div>

This is most of all a question or an idea for future features…

Could Gramps benefit from PostGIS for PostgreSQL or SpatialLite for sqlite rwhen it comes to geospatial data?  
Maybe as some kind of “companion database function”?

With those solutions people could actually download and import national historical geospatial databases that could be used in Gramps…

Just as two examples, I know that both Norway and Sweden have some geospatial databases with historical data, historical names, etc.  
I have also seen a few Universities around that have made some geospatial databases with historical data… and most of those data is actually Open Source and Open Data.

And Yes, those datasets had to be downloaded manually outside of Gramps, because they can be multiple terabytes in size…

Maybe a feature to enable it as an extra feature in Gramps, with an easy one button “import geospatial data from file” or just a wiki instruction on how to import that type of data via a Windows, MAC or Linux cmd line/prompt?

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [April 27, 2024, 4:09pm UTC](https://gramps.discourse.group/t/gramps-vs-postgis-vs-spatiallite/5345/2 "2024-04-27T16:09:29Z")

</div>

This is interesting.

You idea popped as I was wondering whether to add the [**Home Place**](https://gramps.discourse.group/t/display-gramps-places-in-relative-terms-of-here-now-who/2302) designation to **[GEPS 043](https://www.gramps-project.org/wiki/index.php/GEPS_043:_Improving_GEDCOM_support_for_Places): Improving GEDCOM support for Places**.

And noticed that while there is a proposal to add a UUID data element to the Gramps People model, there isn’t a similar UUID extension for the Place or Citation model. However, the existence of a UUID for People seems like a 1st step towards a harmonization/merge engine for Gramps.

I’ve begun using the GeoNames (wiki: [Geonames](https://www.gramps-project.org/wiki/index.php/Geonames); addon: [GeoName](https://www.gramps-project.org/wiki/index.php/Addon:GeoName), [PlaceCleanup](https://www.gramps-project.org/wiki/index.php/Addon:PlaceCleanupGramplet), [GetGov](https://www.gramps-project.org/wiki/index.php/Addon:GetGOV))

**PlaceCleanup** highjacks the Gramps PlaceID as a UUID. That is OK if I will only use the GeoNames gazetteer. But what happens if someone writes a plugin that leverages features an external database like [PostGIS](http://www.refractions.net/products/postgis/) or [SpatiaLite](https://www.gaia-gis.it/fossil/libspatialite/index) in the future? And such plugins might scrape data into Gramps (like **PlaceCleanup** ) or become more sophisticated (like @StoltHD suggests) and poll for live updates.

So how about UUIDs for the Core Objects in Gramps? Hopefully with more than a Name and Value tuple.

* * *

# Other Gazatteers

> [@Maria\_Babzien](#):
>
> _from [genealogy.net/gramps-L](https://discourse.genealogy.net/t/auf-der-suche-nach-einem-beispiel-fuer-eine-ortshierarchie-in-deutschland/823017/2)_  
> do you know [GOV :: The Historic Gazetteer](http://www.gov.genealogy.net/search/index) ?

---

<div class="post-metadata">

**Author:** ![StoltHD](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@StoltHD](https://gramps.discourse.group/u/StoltHD)\
**Post date:** [April 27, 2024, 4:25pm UTC](https://gramps.discourse.group/t/gramps-vs-postgis-vs-spatiallite/5345/3 "2024-04-27T16:25:33Z")

</div>

Most Gazetteer data that include geospatial data can be imported into any of these solutions as long as the data is CSV or JSON, just like how most geospatial data from cartography agencies store them.

* * *

I have actually imported the whole geonames csv file into Gramps via the CSV import (reduced columns of course).

I did actually create the Gramps CSV for hierarchy place data in Excel with a query against 2 separate workbooks… That was back when I recommended using OpenRefine to clean up place data… 5-6 years ago, or something… before this forum.

---

<div class="post-metadata">

**Author:** ![StoltHD](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@StoltHD](https://gramps.discourse.group/u/StoltHD)\
**Post date:** [April 27, 2024, 4:35pm UTC](https://gramps.discourse.group/t/gramps-vs-postgis-vs-spatiallite/5345/4 "2024-04-27T16:35:04Z")

</div>

I should add that that is not a good idea as Gramps query data today…

Even my geonames file for Norwegian places (some 300k place names), took a really long time to import and even longer to open in the Place View…

And back then it was also the problem with the CSV import crashing when the data in the CSV was not in the correct order, and all the problems with overwritten place names etc.

* * *

Edit: just needed to change some grammars and lost words

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [April 27, 2024, 5:24pm UTC](https://gramps.discourse.group/t/gramps-vs-postgis-vs-spatiallite/5345/5 "2024-04-27T17:24:24Z")

</div>

> [@emyoulation](#):
>
> So how about UUIDs for the Core Objects in Gramps? Hopefully with more than a Name and Value tuple.

A `UID` and `EXID` tag are included in the `IDENTIFIER_STRUCTURE` in the Gedcom 7.0 specification.

For an identifier maintained by an external authority you would use `EXID`. For example:

```python
2 EXID object_388462
3 TYPE http://gov.genealogy.net/

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [May 27, 2024, 5:25pm UTC](https://gramps.discourse.group/t/gramps-vs-postgis-vs-spatiallite/5345/6 "2024-05-27T17:25:01Z")

</div>

Closed on May 27, 2024, 5:25pm UTC

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