All Projects → Denikozub → Offroad-routing-engine

Denikozub / Offroad-routing-engine

Licence: other
Off-road Navigation System

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Offroad-routing-engine

Graphhopper
Open source routing engine for OpenStreetMap. Use it as Java library or standalone web server.
Stars: ✭ 3,457 (+21506.25%)
Mutual labels:  openstreetmap, pathfinding, routing-engine
Osmnx
OSMnx: Python for street networks. Retrieve, model, analyze, and visualize street networks and other spatial data from OpenStreetMap.
Stars: ✭ 3,357 (+20881.25%)
Mutual labels:  maps, openstreetmap, gis
Go Staticmaps
A go (golang) library and command line tool to render static map images using OpenStreetMap tiles.
Stars: ✭ 246 (+1437.5%)
Mutual labels:  maps, openstreetmap, gis
mapmint
Fast and easy webmapping.
Stars: ✭ 51 (+218.75%)
Mutual labels:  maps, gis
google-maps-at-88-mph
Google Maps keeps old satellite imagery around for a while – this tool collects what's available for a user-specified region in the form of a GIF.
Stars: ✭ 93 (+481.25%)
Mutual labels:  maps, gis
organicmaps
🍃 Organic Maps is a free Android & iOS offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware. Your donations and positive reviews motivate and inspire our small team!
Stars: ✭ 3,689 (+22956.25%)
Mutual labels:  maps, openstreetmap
osm-export-tool-python
command line tool + Python library for exporting OSM in various file formats.
Stars: ✭ 32 (+100%)
Mutual labels:  openstreetmap, gis
maps4cim
maps4cim - a real world map generator for CiM 2
Stars: ✭ 21 (+31.25%)
Mutual labels:  maps, openstreetmap
django-graphql-geojson
GeoJSON support for Graphene Django
Stars: ✭ 61 (+281.25%)
Mutual labels:  maps, gis
mapus
A map tool with real-time collaboration 🗺️
Stars: ✭ 2,687 (+16693.75%)
Mutual labels:  maps, openstreetmap
o.map
Open Street Map app - KaiOS
Stars: ✭ 51 (+218.75%)
Mutual labels:  maps, openstreetmap
cloud-tileserver
Serve mapbox vectortiles via AWS stack
Stars: ✭ 48 (+200%)
Mutual labels:  openstreetmap, gis
osm-geojson
🔰 Get GeoJSON of a OpenStreetMap's relation from the API.
Stars: ✭ 42 (+162.5%)
Mutual labels:  maps, openstreetmap
HMap
:earth: HMap | 基于openlayers的封装组件
Stars: ✭ 64 (+300%)
Mutual labels:  openstreetmap, gis
s60-maps
Yet another maps for Symbian OS
Stars: ✭ 27 (+68.75%)
Mutual labels:  maps, openstreetmap
a11yjson
A11yJSON: A standard to describe the accessibility of the physical world.
Stars: ✭ 58 (+262.5%)
Mutual labels:  openstreetmap, gis
osmcha
Python package to detect suspicious OSM changesets
Stars: ✭ 33 (+106.25%)
Mutual labels:  openstreetmap, gis
bexhill-osm
A local mapping project using data from OpenStreetMap. Includes overlays, walking directions and historical information.
Stars: ✭ 16 (+0%)
Mutual labels:  maps, openstreetmap
tailormap
B3partners Tailormap repository
Stars: ✭ 26 (+62.5%)
Mutual labels:  maps, gis
gazetteer
OSM ElasticSearch geocoder and addresses exporter
Stars: ✭ 93 (+481.25%)
Mutual labels:  openstreetmap, gis

Off-road Navigation System

Installation
Documentation
Usage


by Denis Kozub

  • World discretization using visibility graphs
  • O(nh log n) reduced visibility graph algorithm (see algorithm explanation)
  • A* pathfinding without graph precomputing
  • Hierarchical approach for graph building
  • No projected crs, works in any part of the world
  • Open source OpenStreetMap data (see OSM data explanation)
  • Downloading OMS maps at runtime
  • Saving and loading precomputed map data
  • Multiprocessing and visualization tools support

Scope of application:

  • Extending functionality of other routing engines
  • Road and facilities design
  • Rescue and military operations planning
  • Route planning for hiking and tourism

Usage

IPython notebook

Downloading and processing data

There are two ways you can obtain OSM data in osm.pbf format:

If the map is downloaded, you can specify the filename and parse it:

from offroad_routing import VisibilityGraph

vgraph = VisibilityGraph()
filename = "../maps/kozlovo.osm.pbf"
bbox = [36.2, 56.5, 36.7, 56.7]
vgraph.compute_geometry(bbox=bbox, filename=filename)

Or, alternatively, you can only specify the bounding box, and the map will be downloaded automatically (curl & osmosis required):

bbox = [34, 59, 34.2, 59.1]
vgraph.compute_geometry(bbox=bbox)

Parsed data can be pruned with chosen or default parameters. If not specified, optimal parameters will be computed by the algorithm.

vgraph.prune_geometry(epsilon_polygon=0.003,
                      epsilon_polyline=0.001,
                      bbox_comp=10)

Computed data can also be saved in .h5 file to skip data processing the next time:

vgraph.save_geometry("../maps/user_area.h5")

Using precomputed data and building visibility graph

from offroad_routing import VisibilityGraph

vgraph = VisibilityGraph()
vgraph.load_geometry("../maps/user_area.h5")

Visibility graph can be built and visualized using osmnx:

import osmnx as ox

G = vgraph.build_graph(inside_percent=0, multiprocessing=False)
ox.plot_graph(G)

VisibilityGraph may also be used to find incident edges for a single point. This feature is used for pathfinding without graph building:

import matplotlib.pyplot as plt
import mplleaflet

start = ((34.02, 59.01), None, None, None, None)
incidents = vgraph.incident_vertices(start)

fig = plt.figure()
plt.scatter(start[0][0], start[0][1], color='r')
for p in incidents:
    plt.scatter(p[0][0], p[0][1], color='b')
mplleaflet.display(fig=fig)

Building routes

from offroad_routing import VisibilityGraph, AStar

vgraph = VisibilityGraph()
vgraph.load_geometry("../maps/user_area.h5")

pathfinder = AStar(vgraph)
path = pathfinder.find((34.02, 59.01), (34.12, 59.09), default_weight=10, heuristic_multiplier=10)

Path can be viewed in coordinate format:

print(path.path())

However, specialized tools can be used to save and visualize the path:

The following code saves the path to a gpx file and generates a link to view it online.

from offroad_routing import GpxTrack

track = GpxTrack(path)
track.write_file("track.gpx")
track.visualize()

You can check the route here.

Performance

Computational time for an extremely dense area of 800 km2 is about 20 seconds with multiprocessing. Computational time for a much freer area or 120 km2 is 1 second. Since A* pathfinding does not require building the whole graph, computational time is even lower: The last example (see above) took only 0.6 seconds, which is 40% faster than building a graph.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].