OpenStreetMap

Matt_'s Diary

Recent diary entries

TIGER road clumps

Posted by Matt_ on 19 October 2023 in English.

I pulled together some info I wanted to share: what is the longest connected group of untouched TIGER imported roadways in the U.S.? The answer is this 1258.6km group of ways in Brooks County, Texas. And then below will be the rest of the info I found. I haven’t done anything with it, I just wanted to share.

Note: the Overpass queries I link directly to are all relatively quick since they’re just lists of way IDs. But for some of them I link to pastebin since they were too long to pass in a url.

Overpass Turbo - Brooks County, TX Results from Brooks County, Texas

Idea

The full results are here as a spreadsheet but I also want to explain.

I was looking at the results of the query for unedited ways and nodes in an area near me and noticed there were way more untouched roads than I thought there would be.

Example from a city not actually near me

All the roads I’ve looked at in my area were pretty detailed and accurate to my eye. But then I noticed the unmodified ways were mostly separate from each other, only connected by roads that HAD been edited in the last 15 years.

So a large number of unedited roads in an area can mean they were good to begin with? As long as they’re not still touching at least?

Then, where is the other extreme?

Method

So what is the farthest distance you can travel only on mapped roads unmodified since about 2008? The answer is it depends on the state you’re in.

Basically I ran the “TIGER unmodified ways and nodes” query for each state and wrote a program to go through the results and group ways by connections. There is probably an easier and smarter way to do it but I couldn’t find it and so I got to have fun creating my own. I can share the code if anyone cares but it isn’t very clean.

I also ran the same query as before again with one change. I replaced the last line with:

node(way_cnt.result:2-)->.result2;
.result2 out geom;

This returns just the nodes connecting two or more ways. I used this info to ignore all of the nodes only belonging to a single way, which greatly sped up my horribly inefficient program trying to match 10s to 100s of thousands roads to each other by common nodes.

Once grouped by connections, I calculated each group’s total length using the latitude and longitude of their nodes.

Another note: this data does not include any individual ways, only connected groups of at least two. Also I made no attempt to find connections across state lines.

Finally, the data

Here’s everything I found in spreadsheet form. The file is about 5MB. Columns are: state, number of connected ways in the group, total length of ways, and then a comma-separated list of way IDs you can view by pasting them into the following Overpass query:

[out:json][timeout:25];
way(id:WAY_IDS_HERE);
out geom;

There were no results for RI, PA, MA, HI, or DC. Also if you want to replicate this, don’t query all of MO, OK, TX, or VA in one go. You’d probably need to split up AL, KS, CA, and NM too. There are too many results. I assumed built in limits would stop me from hurting anything by trying to run too big a query. If that’s wrong, I’m very sorry for taxing the Overpass server when I ran all of this.

Some of the results visualized:

The 10 largest (longest) groups in each state:

Query text on Pastebin // Higher res Lower 48 top 10 groups per state

Every group longer than 100 km:

Query text on Pastebin // Higher res Lower 48 everything longer than 100 km

Between 10 and 100 km:

This query was too long even for Pastebin… Higher res Lower 48 everything longer than 10 km but shorter than 100

Everything 10km and up in blue and 100km and up in orange using mapshaper:

Higher resolution Lower 48 everything 10 km and up

One 535km group in Rawlins County, Kansas that is clearly visible on satellite and at a quick glance looks ok but I haven’t checked how the tags on it are:

Overpass Turbo - Rawlins County, KS Results from Rawlins County, Kansas

A 61km group in Greenbrier County, West Virginia in a forested area that could still be spruced-up? (pun intended, but I don’t actually know if this is a an example of needing work or not)

Overpass Turbo - Greenbrier County, WV Results from Greenbrier County, West Virginia

I hope some of this was helpful. Thank you for reading!

Lakes, dams, and where to find them

Posted by Matt_ on 12 October 2023 in English. Last updated on 18 October 2023.

I wanted to share my experience finding and fixing a misplaced lake and dam as an example of what I’ve been working on in case it’s of interest to anyone else. I think I’ve picked a good example of what I’ve been finding. I also tried to make it as short and to the point as possible and then made this too long anyway. Here we go!

Finding a problem

Rowe Lake as a node in a forest

Rowe Lake (gnis:feature_id=1640193) (node) and Rowe Lake Dam (gnis:feature_id=1640194)(node) were two nodes on the side of a mountain next to a road in Monroe County, Tennessee. There were two problems with that:

  1. On satellite there was no lake or dam visible in the area. Which isn’t proof this is the wrong location, but it looks like solid trees.
  2. The GNIS tags on both nodes had them in county 157: Shelby County, over 300 miles away on the other side of the state.

Not finding a solution

Not great search results for Rowe Lake, TN

My first attempt to find the location for this lake and dam didn’t work so well but I wanted to mention this. I searched the web for Rowe Lake, and Rowe Lake, Tennessee. There are a bunch of results, but they all seem to have been generated off of those same coordinates from GNIS! Fishing, weather, hiking, and lodging, all for a patch of forest with no easy foot access! Even the ones that describe it as being in Shelby County still give the coordinates in Monroe County. So much anti-helpful content from such a small piece of information.

Actually finding it

The lake's position over 300 miles east of Shelby County

So where is it? The county Rowe Lake is supposed to be in (Shelby) is due West of the coordinates given. What if the latitude was right, but the longitude was the problem?

In JOSM I began searching along the line at 35.325° North for anything lake-like. Shelby County is 25 miles wide however. I’m scrolling while zoomed all the way in and not finding it, at least not very quickly.

What if only part of the longitude is wrong? Shelby County extends from about -89.63°W to about -90.09°W. GNIS’s longitude was -84.0499°W. What if we try -90.0499°W at the same latitude? A whole number of degrees difference.

A possible solution as seen in JOSM

Hey, that’s a lake with a flat, dam-like side! But is it right? Enter the hero of this story: the United States Army Corp of Engineers’ National Inventory of Dams!

The National Inventory of Dams entry for a dam by the name of Rowe

Yup, found it. So I moved the lake and dam nodes, used them when tracing the outline of the lake, and tagged the dam with the nice id number the NID provides (TN15714). I’ve also sent the correction for the lake’s coordinates to GNIS, since they don’t track dams any more. I haven’t contacted them before, hopefully they’ll make an update. Either way, this was fun for me. Thanks for reading!

The final result

Extra info

This is one example of the edits I’ve been working on for the past few weeks. There have been a bunch of lakes and dams I was able to successfully (re)locate the same way, but other patterns emerged as well. I also wanted to share that perspective (briefly-ish):

  • There were many lakes and dams where a one digit change in its coordinates gets it into the county specified by GNIS, and the new location matches what is in the National Inventory of Dams (NID).
  • Almost as many cases where the coordinates were right and the GNIS county was simply wrong. Again, the NID came to the rescue for confirmation.
  • A bunch where the coordinates weren’t wrong they were just very close to the county border and the dam really is in both counties.
  • Sometimes the coordinates were wrong but GNIS already fixed them by creating new entries that were also already imported into OSM. So you move the lake and dam nodes to the correct location but another lake and dam with the same name is already there.
  • Finally, there are times where the coordinates were wrong, GNIS made new entries with the correct info, and a body of water near the incorrect location somehow picked up the same name as the one a hundred miles away. An example is Tabernacle Camp Lake at the Tabernacle Campground in Monroe County, Georgia. And then Tabernacle Camp Lake, almost exactly one degree longitude to the west, in the middle of somebody’s home or farm. So you have the NID showing a dam at the place the campground actually is, but the NHD is showing a lake with that name at the other location! So for now, I guess both exist.