Open Streetmap Dataset
BRIDGES provides easy access to Open Street Map (OSM) data. This can be very useful in graph algorithms and graph based applications (Bacon Number, Dijkstra's algorithms, MST, etc.). We have the capability to specify city names or bounding box of locations to retrieve the map data.
Possible filtering values include:
- motorway
- trunk (includes the above too)
- primary (includes the above too)
- secondary (includes the above too)
- tertiary (includes the above too)
- unclassified (includes the above too)
- residential (includes the above too)
- living_street (includes the above too)
- service (includes the above too)
- trails
- walking (includes trails)
- bicycle (includes tertiary, unclassified, residential and living_street)
A list of avaliable cities can be found at Bridges OSM Cities
When using a bounding box for your input slection put the coordinates in the order of minLat, minLon, maxLat, maxLon or (SWNE).
Suggested Examples:
data_source.get_osm_data("New York, New York", "default")
data_source.get_osm_data("Denver, Colorado", "default")
data_source.get_osm_data("Chicago, Illinois", "residential")
See also
This tutorial gives an introduction to the usage of ColorGrid. You can find the complete documentation of the features in the Doxygen documentation of the following classes and functions:
- OSMData [Java] [C++] [Python]
- OSMVertex [Java] [C++] [Python]
- OSMEdge [Java] [C++] [Python]
- getOSMData() and variants [Java] [C++] [Python]
Accessing Open Street Map Data: An Example BRIDGES program
The program snippet below illustrates how to obtain map data of the UNC Charlotte.
- Copy/paste the code into your environment and compile.
- Assuming all your code is correct and it compiles correctly, the code will print a record of the the number of vertices and edges and the location of the first vertex for this dataset.