# Place boundaries on the map stored as GeoJSON objects

**URL:** <https://gramps.discourse.group/t/place-boundaries-on-the-map-stored-as-geojson-objects/9930>\
**Category:** Gramps Web\
**Created:** [September 2, 2026, 4:46pm UTC](https://gramps.discourse.group/t/place-boundaries-on-the-map-stored-as-geojson-objects/9930 "2026-09-02T16:46:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![petermgrund](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/petermgrund/32/9648_2.png) [@petermgrund](https://gramps.discourse.group/u/petermgrund)\
**Post date:** [September 2, 2026, 4:46pm UTC](https://gramps.discourse.group/t/place-boundaries-on-the-map-stored-as-geojson-objects/9930/1 "2026-09-02T16:46:07Z")

</div>

Hello everyone, first post here though I’ve been reading along for a while. I’ve used Gramps Web for just over a year and run a multi-tree server with it for a group I coordinate researching Norwegian ancestry. It has been excellent for us, and I’ve been building a few tools ([GitHub - petermgrund/bifrost: Companion app for Gramps Web that bridges a family tree to outside services · GitHub](https://github.com/petermgrund/bifrost)) for our Gramps Web instance intended to connect to other open source software like Immich and Paperless-ngx, which stores all of our genealogical media. One feature has turned into something I’d like to ask about, though, as trying to implement it myself has been tricky.

When a place is a county, a state or a country, the place page shows it as a single pin at its coordinates, which looks oddly precise and doesn’t show the extent of the place. On my own instance I’ve been running a small hack that draws the boundary polygon instead:

 ![Screenshot 2026-09-02 at 12.30.29 PM](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/3/3204b9bcce9c9f8d85994f5a6a710d7852836bf5.jpeg)

The hack works by injecting a script into the frontend. The actual boundary comes from the OSM relation. It’s fragile, but works for now.

I want to see, though, if there is any interest in trying to fold this feature into Gramps Web. If so, my initial thought would be to a place’s boundary as a media object attached to the place the same way it already does for a historical map image, making it into a map overlay through a media object with a `map:bounds` attribute. The media object would be a GeoJSON file that sits in the place’s media list so it exports with your tree and syncs to Gramps desktop. I think this would avoid any server or API changes needed. The place page then draws it as a filled outline on the minimap. Places without one keep just the pin so nothing would change there.

Getting the shapefile file would be up to you. You could export it from OpenStreetMap for the relation that matches the place or let a tool do it. My GitHub repo I referenced above builds these from a place’s OSM relation URL.

And, as we know, boundaries change over time. Gramps media objects carry a date and Gramps dates can be spans, so a place could hold several boundary files and the map could show the one matching the year in view like the year that already drives the OpenHistoricalMap layer and the time slider.

Before I open a feature request I’d like to know if there would be interest from the project’s developers in this feature, if others would use it, and any thoughts from the community.

Thanks for your time and work on this project.

Here is my version information:  
`Gramps 6.0.8`  
`Gramps Web API 3.21.1`  
`Gramps Web Frontend 26.8.1`  
`Gramps QL 0.5.0`  
`Sifts 1.3.1`  
`locale: en`  
`multi-tree: true`  
`task queue: true`  
`OCR: true`  
`chat: true`

---

<div class="post-metadata">

**Author:** ![dsblank](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/dsblank/32/3649_2.png) [@dsblank](https://gramps.discourse.group/u/dsblank)\
**Post date:** [September 2, 2026, 5:22pm UTC](https://gramps.discourse.group/t/place-boundaries-on-the-map-stored-as-geojson-objects/9930/2 "2026-09-02T17:22:43Z")

</div>

That is a great idea, and has already been added to gramps, and to Gramps Connect! The standard so far is to add Keyhole Markup Language (KML) as a note, to a place, and they will automatically draw on the map. Gramps Connect also allows creating and editing the KML objects.

- [Adding places from KML [Keyhole Markup Language] files](https://gramps.discourse.group/t/adding-places-from-kml-keyhole-markup-language-files/175)
- [GitHub - dsblank/gramps-connect: A modern, fast Gramps-based web app for genealogy and family histories · GitHub](https://github.com/dsblank/gramps-connect)

---

<div class="post-metadata">

**Author:** ![DavidMStraub](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davidmstraub/32/7_2.png) [@DavidMStraub](https://gramps.discourse.group/u/DavidMStraub)\
**Post date:** [September 2, 2026, 7:03pm UTC](https://gramps.discourse.group/t/place-boundaries-on-the-map-stored-as-geojson-objects/9930/3 "2026-09-02T19:03:17Z")

</div>

Hi Peter,

thanks for sharing!

As you noticed I’ve invested a lot of work into improving the Gramps Web map view and there is still a lot of potential. This is not something I have thought of, so it’s definitely an interesting idea.

What I find a bit problematic is that this is in tension with Gramps’ data model - a place in Gramps is supposed to have a single coordinate pair, so it’s a point on the map. I am skeptical Gramps is the right tool to store geographic boundaries of administrative units - and I would also say this is not genealogical data, but historical data. And there is already a fantastic project holding that data as GeoJSON, namely [OpenHistoricalMap](https://www.openhistoricalmap.org/). So in this specific case, I would find it more logical to associate the Gramps place with an OHM object via its ID and display the data from there.

You might also be interested in my parallel project Domus - I’m planning to add Wikidata places to Gramps Web in the near future.

> [@Domus house history project](https://gramps.discourse.group/t/domus-house-history-project/9920):
>
> Hi, I wanted to share a new genealogy project of mine, for those who haven’t heard of it yet. The idea was born while working on Gramps Web’s map view: I’m creating places of type “building” for each house where an ancestor lived. In combination with Gramps Web’s OpenHistoricalMap layer and historical map overlays, this allows me to build little geographical time machines for my ancestors’ home towns. However, I always felt this house history research goes beyond genealogy and could profit fr…
