Skip to content

tedsteiner/OpenStreetMap.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenStreetMap.jl

Build Status Coverage Status OpenStreetMap OpenStreetMap OpenStreetMap

This package provides basic functionality for parsing, viewing, and working with OpenStreetMap map data. The package is intended mainly for researchers who want to incorporate this rich, global data into their work, and has been designed with both speed and simplicity in mind, especially for those who might be new to Julia.

Note: Our automated tests currently fail on Julia 0.4, but these problems appear to be contained to the Travis test system and are caused by a dependent package. OpenStreetMap.jl should run without issue on both Julia 0.3 and 0.4, and the tests pass on local machines for Julia 0.3.7 and 0.4.2 on OS X 10.11 and Ubuntu 14.04.

Capabilities

  • Parse an OpenStreetMap XML datafile (OSM files)
  • Crop maps to specified boundaries
  • Convert maps between LLA, ECEF, and ENU coordinates
  • Extract highways, buildings, and tagged features from OSM data
  • Filter data by various classes:
    • Ways suitable for driving, walking, or cycling
    • Freeways, major city streets, residential streets, etc.
    • Accommodations, shops, industry, etc.
  • Draw detailed maps using Julia's Winston graphics package with a variety of options
  • Compute shortest or fastest driving, cycling, and walking routes using Julia's Graphs package

Examples

This gallery of map examples shows plotting and routing capabilities of the OpenStreetMap package. All displayed images were created using only OpenStreetMap.jl. For example:

Street map of Boston, Massachusetts:

Boston

Documentation

OpenStreetMap.jl documentation is hosted by ReadTheDocs.

Setup

Add this package within Julia using:

Pkg.add("OpenStreetMap")
Dependencies

The following packages will automatically be added as "additional packages", if you do not already have them:

  • Geodesy.jl: Map coordinate transforms, formerly part of OpenStreetMap.jl
  • LightXML.jl: parsing OpenStreetMap datafiles
  • LibExpat.jl: streaming OpenStreetMap datafiles
  • Winston.jl: map plotting
  • Graphs.jl: map routing

Note: LightXML.jl relies on libxml2, which is shipped with Mac OS X and many Linux systems. So this package may work out of the box. If not, check whether you have libxml2 installed and whether libxml2.so (for Linux) or libxml2.dylib (for Mac) is on your library search path. I have tested it to work out of the box in Mac OS X 10.9 and 10.10 (Mavericks and Yosemite), Ubuntu 14.04, and Windows 7. Winston.jl has a few additional dependencies, which it should resolve automatically. All other code is written in native Julia.

Package Status and Contributions

All the functionality that I personally need for my work is now implemented in this package, and I am running out of ideas for additional functionality. Therefore, future updates will mostly depend on GitHub issues (bug reports or feature requests) created by users. Pull requests for additional functionality are very welcome, as well.

If you use this package, please feel free to send me feedback on how I might improve it's usability and documentation.