OpenStreetMapXPlot.jl
OSMToolset.jl
The goal of this package is to provide a backbone for multi-agent modelling and simulation of cities.
The package can parse *.osm
and *.pbf
(contributed by @blegat) files and generate a Graphs.jl representation along the metadata.
Documentation | Build Status |
---|---|
Linux and macOS |
PyCall.jl
The current version uses at least Julia 1.6.
using Pkg; Pkg.add("OpenStreetMapX")
In order to plot the maps we recommend two tools:
OpenStreetMapXPlot.jl
packageOSMToolset.jl
packageIn order to install all plotting backends please run the commands below:
using Pkg
Pkg.add(["Plots", "OpenStreetMapXPlot", "CondaPkg"])
using CondaPkg
CondaPkg.add_channel("conda-forge")
CondaPkg.add("folium")
using OpenStreetMapX
filename = OpenStreetMapX.sample_map_path()
map_data = get_map_data(filename);
println("The map contains $(length(map_data.nodes)) nodes")
The picture above has been generated with folium
- for source code see the samples directory for a more complete example and have a look at OpenStreetMapXPlot.jl
for a route plotting.
The simplest way to get the map data is to go to the Open Street Map project web page.
In order to obtain the *.osm
file follow the steps below:
This code is a major re-write of project - available at https://github.com/tedsteiner/OpenStreetMap.jl .
Compared to the original package major changes include among many others:
Graphs.jl
is used for map data storagePlots.jl
with GR is used as backend for map vizualization (via a separate package OpenStreetMapXPlot.jl
)The creation of some parts of this source code was partially financed by research project supported by the Ontario Centres of Excellence ("OCE") under Voucher for Innovation and Productivity (VIP) program, OCE Project Number: 30293, project name: "Agent-based simulation modelling of out-of-home advertising viewing opportunity conducted in cooperation with Environics Analytics of Toronto, Canada.