About HIFLD
OSM power user SherbetS has been documenting the HIFLD dataset. It is a large corpus of public domain licensed geospatial information about infrastructure around the United States.
Get all the data into JOSM
Download the dataset in GeoJSON format here. Fire up JOSM and open the file. This will create a layer that is just the HIFLD data. If won’t have any fields that look like OSM fields so DO NOT upload this directly.
Next we need to get the OSM data into JOSM. For this demo we will use the data for the state of Wyoming.
- Click the green download button to open the Download dialog.
- Click the “Download from Overpass API” tab at the top.
- In the Overpass text box put something like:
1 2 3 4 5 6 7 8 9 10 11 12 13
// fetch area “Wyoming” to search in {{geocodeArea:Wyoming}}->.searchArea; // gather results ( // query part for: “amenity=hospital” nwr["amenity"="hospital"](area.searchArea); // query part for: “amenity=clinic” nwr["amenity"="clinic"](area.searchArea); ); // print results out body; >; out skel qt;
- Hit the “Download into new layer” button at the bottom
We now have 2 layers. One with the HIFLD data and one with the OSM data.
Finding unmapped items with the conflation plugin
We will now use the Conflation Plugin to match the nodes in the HIFLD dataset with OSM downloaded elements. Any elements that do not match to an OSM item should be reviewed and additions made. Any matched elements may be reviewed for completeness in OSM but that’s a separate matter.
We will start by selecting elements from the HIFLD dataset that are in our state of interest (“WY” in this case) and add this to the Conflation tool as the “Reference”. This is the set we’re trying to match elements to.
- Make the HIFLD layer active using the Layers pane right click > Activate
- Open the find element dialog Ctrl+F
- Search for all elements tagged as being in Wyoming STATE="WY"
- Click the “Configure” button on the conflation tool pane
- Click the upper “Freeze” button on the “Configure conflation settings” pane
Now we need to add the OSM data to the “Subject” section of the conflation tool. This is the set of all the things the “Reference” set can match into.
- Make the OSM layer active using the Layers pane right click > Activate
- Open the find element dialog Ctrl+F
- Search for all elements tagged as being in a hospital or clinic amenity=hospital OR amenity=clinic
- Click the lower “Freeze” button
Because hospital grounds are typically large I changed the “Distance” parameter in the conflation settings to be “Centroid < 150”. This may need to be tuned based on variation.
Hit “Generate match…” to set the tool to work. It will relatively quickly generate a list of matched and unmatched items.
Go through the results
All of the matched items may be reviewed for accuracy and perhaps if there is interesting data from HIFLD that is worth adding to OSM (address information, helipad availability etc). However, the most interesting items will be unmatched. This indicates there is a health facility missing from OSM. Here’s a few from this search:
Conclusion
You can now go an map any missing facility as per the usual OSM guidelines.
SherbetS has posted a walkthrough of how they adjust this kind of file to match OSM tagging guidelines. If should help speed up importing process and is worth a read.