How to add admin level data to OSM?

Do you know what is involved to add admin level data to OSM?

Well, it’s “open”, so anyone can just add it.

That’s not super helpful to Robert.

I’m definitely not the source for this info - I haven’t done a ton of OSM editing. I can’t help much here, as far as direct step-by-step instructions go, but hopefully there’s some direction beyond “add it” that we can offer fellow mappers.

Sure. It’s a bit hairy, but here goes:

  1. First, to add an admin_level boundary, the boundary has to be “administrative”. OSM gets pretty cranky about not putting in admin_level boundaries for things that aren’t administrative. The definition can be found here. Essentially, there has to be some form of government that recognizes the boundary for administrative purposes. That’s why, for example, Rhode Island counties are not admin boundaries in OSM but counties in other states are. MA counties are being debated and for the moment nobody’s gone hog wild and removed the admin_level tagging. But that’s probably deeper into OSM ivory tower geography politics than you really want to go.

  2. Even if a boundary is not administrative it can still be marked as some other type of boundary. For example, the RI counties are (IMO obnoxiously) marked as boundary=region. But there’s also boundary=census, boundary=postal_code, etc. A full list can be found here. I’m guessing that it doesn’t actually matter that the boundary is marked as administrative as long as it’s in OSM as a properly-formed polygon. For example, Hawaii doesn’t have cities and towns, so no admin boundaries below the county level, except for Honolulu which I’ve gotten away with so far. There’s a boundary for, say, Haleiwa, but it’s a census boundary and not an “admin” boundary.

  3. If the boundary is real and it really doesn’t exist in the map, you need to download and install the JOSM program to edit the map.

  4. Next, you have to find a data source for the boundary. Usually this is something like a state or county GIS web site that has shapefiles or KML files or something like that. There’s a plugin for JOSM that lets you read those files.

  5. Once you have those files, load them into JOSM, and copy the polygon for the boundary you need to add into a new layer. Add the polygon into a boundary relation and add all the proper tags to it. Ensure that inner/outer relation roles are set properly.

  6. Hit the “validate” button. That will ensure you didn’t make any errors. If that checks out ok, hit the upload button and voila! New boundary.

  7. If the boundary contains parts of existing boundaries, it gets a little more complicated. You want to reuse any existing boundary fragments from other boundaries so you don’t have a bunch of duplicate lines overlapping in the map. You’ll need to do a bunch of splitting and combining to do this properly. It does take some practice to get the hang of it.

I hope this helps. To be clear, adding in admin levels isn’t the generally the issue, it’s adding in the boundary polygons themselves. I would suggest boundary relations are probably not a good starting point for novice mappers, but it’s actually pretty straightforward once you get the hang of it.

OSM has a slack server and the folks on there are generally pretty helpful.


Great post! Should it be added in the Wiki section for future reference?

1 Like

:clap: :clap: :clap:
This is one of the few times I’ve seen a “How do I” question about OSM not answered with some variation of “don’t”. :rofl:

This should definitely go into the #wiki category. I don’t want to move your post, because that will take away context in this thread. I also don’t want to copy/paste your post into a new thread in there, because that will make it look like it’s my knowledge.
Do you want to start that new thread in #wiki ?