Openstreetmap

Openstreetmap is a tremendous resource that has a wealth and quality of information that often surpasses Google Maps, the web’s de-facto mapping solution since 2005. It contains information that is freely available and doesn’t cost money to use their API, which is a huge benefit when compared to Google Maps’s very expensive API charges.

I recently got a dog and would like to take him out on long outings without having to carry water. So I wanted to plot a series of waypoints that were drinking fountains with a dog bowl, from which to construct walking/running loops. These dog bowls are not unusual to see in suburban Melbourne. I could not find a website that readily makes this information available, so I surmise that knowledge of their whereabouts is commonly gathered through experience. This is my first dog and I am not patient when I do not need to be, so I did not want to settle for repetitive circuits while I built up a mental model of local watering spots. Openstreetmap seems to be the only source of information for this that distinguishes if dogs are accommodated or not, and helpfully it exposes all of this information through its API.

API Endpoint and Access

The Overpass API is the read-only interface on a server that receives OverpassQL payloads and returns geographic information in different formats such as CSV, JSON, etc.

Usefully, there is Overpass Turbo to help with queries and plotting results, to play around with.

As this is a free service, an API key is not needed, and you can start writing queries in the web user interface to get started.

Getting Started with OverpassQL

I found the OverpassQL language to be unusual, but it was straightforward to figure out what I needed to do, which was to find points (nodes, in Openstreetmap terminology) matching a certain condition. Later on, I would work up to parks, which form an area (or way, in Openstreetmap) and requires a little bit more effort.

I found that the Overpass API Example is a very useful guide.

Queries

Drinking Water

This query will show all drinking water nodes in your viewport on Overpass Turbo.

[bbox:{{bbox}}];
node["amenity"="drinking_water"];
out;
Drinking water (fountains) in the suburbs.

Drinking water query results

Drinking Water With a Dog Bowl

This query will show all drinking water nodes that have the "dog"="yes" tag, in your viewport on Overpass Turbo.

[bbox:{{bbox}}];
node["amenity"="drinking_water"](if: t["dog"] == "yes");
out;

Bonus: Parks

This query will show all parks in your viewport on Overpass Turbo.

[bbox:{{bbox}}];
(
  way["leisure"="park"];
    >;
  );
out;
Parks in the suburbs.

Parks query results

I used this to start scouting out nearby parks that might be missing drinking water information.