TIGER fixup/County boundaries

From OpenStreetMap Wiki
Jump to navigation Jump to search
Difference between old and new county boundary. Progress!

The original TIGER boundary import into OpenStreetMap introduced county boundaries across the United States. These original TIGER boundaries (and roadways) were occasionally wrong, overly simplified, or just have not kept up to date with changes since then. A post by ElliottPlack in the US community Discourse highlighted many of the challenges of updating county boundaries in the US. I hope that this guide will provide some useful tips and tricks to make updating county boundaries just slightly less painful.

In this post, we'll walk through the process of updating county boundaries using more accurate data, specifically focusing on replacing outdated geometries and handling any errors that might arise during the process. This is a relatively advanced process, so only proceed if you're very familiar with JOSM and how to work with relations in JOSM via the relation editor.

Prerequisites:

Updating US county boundaries in OSM from the original TIGER boundary import is a critical task that helps improve the accuracy of our map, which has become a one-stop-shop for boundary data. As always, make sure to work carefully and considerately, as boundary updates can have wide-reaching implications for the OSM database and downstream consumers.

The Process

Download a boundary file

To get started, you'll need access to a high-resolution file containing accurate county boundaries. The following file contains TIGER county boundaries for all of the US, with the ways already broken up at each county boundary intersection. This will make adding and replacing the boundary segments more straightforward.

Processed TIGER county boundaries (Google Drive)

Note that this file is large (300+MB) and will slow down JOSM significantly on most computers if you use the whole thing. I would recommend keeping only what you need from it open while working in JOSM, and opening it in wireframe mode [shortcut: Cmd/Ctrl + 'w']. Or, feel free to create your own file or download a license-compatible boundary file from a state GIS service. Also, although this new TIGER data is better than the old TIGER data, some states' GIS services provide even more accurate boundary data.

Retrieve current boundaries with Overpass

Next, we'll use an Overpass query to extract the current state and county boundaries from OSM for a target state. This sample query fetches all county (admin_level=6) boundaries in the selected area. Run it in Overpass or directly in JOSM.

Replace county boundary geometries

With the high-resolution boundary file and the OSM data in hand, it's time to replace the old TIGER-based boundaries with the new data. Typically, you'll first have to survey the area for boundaries that look out of date or way over-simplified. This Overpass query can help you locate these, but zooming in and panning around works too. TIGERMap, with the Counties and equivalents overlay turned on, can be a useful resource to quickly scan the map.

Merge the improved segments into the active layer

Select the new segments you'd like to add to OSM, and use Edit > Merge selection [shortcut: Shift + Cmd/Ctrl + 'm'] to move it into the layer you're working in.

Simplify the new segment(s)

Use the Simplify way tool [shortcut: Shift + 'y']. I generally set this to 5 meters. There's no need to have more nodes than that, and probably even that is too detailed.

Replace the old segment(s)

Use the relation editor to replace the old segment.

By and large, most county boundary relations only have one way between each country boundary intersection, and it is typically a continuous boundary line that has no other purpose. If that is not the case in your particular area, proceed with additional caution. For each of the new boundary segments:

  1. Use Download the parent ways/relations for the old segment you're about the replace. This ensures you see and then also can replace the way in any non-administrative relations that may depend on the old TIGER segment, like timezone or regional relations.
  2. Connect the old segments' county intersections to the new ones (use the Merge nodes functionality [shortcut: 'm'], clicking the old intersection first).
  3. For each of the boundary relations a way belongs to, open the relation editor, and replace the old segment with the new one, in the same position as the old one. Make sure you get the nice 'closed loop' indicator in the relation editor. If you don't see this, check step 2. Set the new member's role as outer.
  4. Delete the old, unused boundary segment(s). Do not use Replace geometry, which can be a temptation to keep the history and make the relation member replacement easier. However, doing so could end up putting glued nodes (which you haven't downloaded) randomly along the new way all over the map!

Upload the new data

Use a good changeset comment. You will probably get upload conflicts from people who have glued roads, rivers, etc, to the old county boundary lines; see below for how to handle that.

Common issues

JOSM-Icon-conflict.svg Conflicts

Because we only downloaded boundary=administrative ways and relations via Overpass, we can safely always resolve conflicts to 'their' version. These are usually nodes that have been glued to the admin boundary, and by clicking Resolve to their version, you allow those nodes to persist wherever they were glued.

Embrace the upload conflicts.

See also