---
title: "Improve OpenStreetMap data by using it"
date: 2025-06-28T14:05:10+02:00
draft: false
image: "post/improve-osm-by-using-it/improve-osm-by-using-it.png"
categories: ['English']
tags: ['django', 'OpenStreetMap', 'notfellchen', 'osm', 'open data', 'geojson']
---

## Introduction

In the last month I improved the mapping of about 100 german animal shelters - not only out of the goodness of my heart, but because it helped me.

Let me explain why: I develop [notfellchen.org](https://notfellchen.org/), where users can search animals in animal shelters, specifically rats, they might want to adopt.
The idea is to have a central website that allows you to search for rats in your area.

This is necessary because only a small percentage of animal shelters has rats. As a user, just checking your next
shelter doesn't work. Some users will stop after checking the second or third one and just buy from a pet shop (which is a very, very bad idea).

Now a central platform for is nice for users but has one problem: How do I, as operator of notfellchen, know where rats are?

I need to **manually check every animal shelter in the country** and if they have rats, ask them for permission to use
images of the rats on my site.
So wait I need to have is a list of animal shelters in germany and have their website, e-mail and phone number.

The source for all of this: You guessed it - OpenStreetMap 🥳


# Getting the data

Downloading all german animal shelters is surprisingly easy: You use [Overpass Turbo](https://overpass-turbo.eu/) and get a `.geojson` to download. 

here is the query I used:

```
[out:json][timeout:25];
// fetch area “Germany” to search in
{{geocodeArea:Germany}}->.searchArea;
// Check search area for all objects with animal shelter tag
nwr["amenity"="animal_shelter"](area.searchArea);
// print results
out geom;
```

Now upload it to notfellchen.org and I'll be fine right?

# Data Issues

Yeah well, this only *mostly* works. There were two main problems:

**Missing contact data** is annoying because I quickly want to check the website of animal shelters.

More annoying were what I'd call **mapping errors**.
Most commonly an animal shelter had multiple nodes/ways tagged as `amenity:animal_shelter`.
The highlight was the "Tierheim München" where about 10 buildings were tagged as `amenity:animal_shelter` and the contact
data was sitting on the building with name "Katzenhaus" ("cat house").

Now the "Tierheim München" appeared in my list 10 times but 9 of them had no contact data at all. 

# Correcting it

I could have corrected this only in the notfellchen database. It would have been faster and I could even automate parts of it.
But I didn't.

For each issue I found, I opened OpenStreetMap and added websites, phone numbers or even re-mapped the area.
For "Tierheim München" I even [opened a thread in the forum](https://community.openstreetmap.org/t/mapping-of-multiple-related-buildings-animal-shelters/131801)
to discuss a proper tagging.

That makes sense for me because I get one important thing:

# What I get out of it: Updates

What if a new shelter was added later or a shelter changed? I already profit a lot from the time people spend adding information, so why stop?

My database stores the OSM ID, so I can regularly query the data again to get updates.
But that only works if I take an "upstream" approach: Fix the data in OSM, then load it into notfellchen.
Otherwise, any change in my database will be overwritten by "old" OSM data.

# Result

In the last month, I made 86 changes to OSM adding the following information

| Type of information | Number of times added | 
|---------------------|-----------------------|
| Website             | 66                    |
| Phone Numbers       | 65                    |
| Operator            | 63                    |
| E-Mail              | 49                    |
| Fax                 | 9                     |

Yes I sometimes even added fax numbers. It was easy enough to add and maybe there is someone might use it.

# Looking forward

I'm of course not done. Only half of the rescues known to OSM in germany are currently checked, so I'll continue that work.

After that I'll start adding the shelters that are just in my database.
Currently, 33 animal shelters are known to notfellchen that are not known to OSM. This number will likely grow, maybe double.

A lot to do. And luckily, this work both benefits me and everyone using OSM. Happy mapping!
