• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
North River Geographic Systems Inc

North River Geographic Systems Inc

Geospatial Problem Solving

  • Home
  • About NRGS
  • Training
  • Blog
  • Resources
    • QGIS Tutorials and Hacks
    • GDAL Tutorials and Hacks
    • PostGIS Tutorials and Hacks
    • GRASS Tutorials and Hacks
    • OSM Tutorials and Hacks
  • Services
    • Support and Services
    • Tennessee NG911 Address Server
    • Forestry Database Services
    • Conservation GIS
  • Portfolio
  • Show Search
Hide Search

Finally pulling data out of OSM

……as opposed to pushing data into OSM.

So I’ve been working on a OpenStreetMap workshop for URISA. I had originally written it 6 or 7 years ago and it’s been touched in spots but not “re-written”. I am doing a top to bottom shakedown of the workshop and fixing slides and adding new information. It’s been like opening a time capsule of sorts of what has changed and what hasn’t changed in OSM/My Life over the last 7 years.

What does this have to do with anything?

When I had last touched the workshop I’m not 100% sure that Overpass was a thing. I know there was a tool to extract OSM data into QGIS and there was a tool in ArcMap to pull down data. You could always download a planet file or use JOSM to download data.

Over the last few years I became aware of overpass but hadn’t used it. I decided to dig into it just a bit for the benefit of the workshop. Overpass lets you specify tags (or attributes) and run that query against the OSM data. You can then download it. Of course you need to be gentle – running a large area with a lot of data will timeout – you’re better off grabbing a OSM file from Geofabrik and processing that.

As of late I’ve gotten fascinated by fire hydrants in OSM – so I ran a query of just TN for Fire hydrants. For the record there are 837 fire hydrants in and around TN. I posted the Overpass query below:

[out:xml][timeout:25];
// gather results
(
  // query part for: “amenity=fire_hydrant”
  node["emergency"="fire_hydrant"](35.00208, -90.34742, 36.61557, -81.64104);
);
// print results
out body;
>;
out skel qt;

So what? Well – now that I have this query written I can actually send it to overpass by command line:

wget -O output.osm --post-file=firehydrant.osm "https://overpass-api.de/api/interpreter"

I can now grab OSM data when I want it (within reason). I could set up a script to run once a week or month and see what has changed.

How does this fit into my favorite piece of software? QGIS has a plugin called QuickOSM .

QuickOSM is leveraging overpass to grab data. I can use place names like Chattanooga to constrain my download. I can specify my overpass file from above and use that. It will even let you parse a OSM file and extract data from that.

Anyway – it was a fun hour of killing time and pulling data out of OSM vs putting data into OSM. Plus if OSM is all you have – the Quick OSM plugin makes it easy to leverage that data to create a map.

Share this:

  • Email
  • Print
  • Twitter
  • Facebook
  • Pocket
  • Tumblr
  • LinkedIn
  • Reddit
  • Pinterest
  • WhatsApp

Primary Sidebar

Follow me on Twitter

My Tweets

Calendar

May 2022
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
« Apr    

Follow Us

  • Twitter
  • GitHub
  • LinkedIn

What we talk about

addresses ArcGIS ASPRS Athens Atlanta Beer Cartography Chattanooga Community Conference Data Do Some Good Education ESRI Forestry FOSS4G foss4gna Fulcrum ga urisa gaurisa Gdal Georgia GeoServer GIS GISP Google GRASS Lidar MAGS open source OpenStreetMap osgeo OSM postgis Python QGIS raleigh Rambling Small Business Tennessee TNGIC Topology Training URISA usvi

North River Geographic Systems Inc

  • Home
  • About NRGS
  • Training
  • Blog
  • Resources
  • Services
  • Portfolio
 

Loading Comments...
 

    loading Cancel
    Post was not sent - check your email addresses!
    Email check failed, please try again
    Sorry, your blog cannot share posts by email.