All Projects β†’ ibaaj β†’ Dijkstra Cartography

ibaaj / Dijkstra Cartography

Licence: other
Using Dijkstra's algorithm ("finding the shortest paths between nodes in a graph") to draw maps 🌍.

Projects that are alternatives of or similar to Dijkstra Cartography

Data Structures
Common data structures and algorithms implemented in JavaScript
Stars: ✭ 139 (-87.5%)
Mutual labels:  algorithm, dijkstra
openstreetmap-americana
A quintessentially American map style
Stars: ✭ 89 (-92%)
Mutual labels:  cartography, openstreetmap
Gbox
🎨 A multi-platform graphic library
Stars: ✭ 216 (-80.58%)
Mutual labels:  algorithm, drawing
Valhalla
Open Source Routing Engine for OpenStreetMap
Stars: ✭ 1,794 (+61.33%)
Mutual labels:  dijkstra, openstreetmap
maps4cim
maps4cim - a real world map generator for CiM 2
Stars: ✭ 21 (-98.11%)
Mutual labels:  cartography, openstreetmap
Algorithms
A collection of algorithms and data structures
Stars: ✭ 11,553 (+938.94%)
Mutual labels:  algorithm, dijkstra
fishfrymap
Fish Fry Map project repository
Stars: ✭ 14 (-98.74%)
Mutual labels:  cartography, openstreetmap
CarteTopo
No description or website provided.
Stars: ✭ 23 (-97.93%)
Mutual labels:  cartography, openstreetmap
s60-maps
Yet another maps for Symbian OS
Stars: ✭ 27 (-97.57%)
Mutual labels:  cartography, openstreetmap
LightOSM.jl
A Julia package for downloading and analysing geospatial data from OpenStreetMap APIs.
Stars: ✭ 32 (-97.12%)
Mutual labels:  openstreetmap, dijkstra
Contextily
Context geo-tiles in Python
Stars: ✭ 254 (-77.16%)
Mutual labels:  cartography, openstreetmap
Graphhopper
Open source routing engine for OpenStreetMap. Use it as Java library or standalone web server.
Stars: ✭ 3,457 (+210.88%)
Mutual labels:  dijkstra, openstreetmap
Terrain Classic
World-wide CartoCSS port of Stamen's classic terrain style
Stars: ✭ 110 (-90.11%)
Mutual labels:  cartography, openstreetmap
Java Ds Algorithms
Data Structures and Algorithms in Java
Stars: ✭ 125 (-88.76%)
Mutual labels:  algorithm, dijkstra
Osmic
CC0 SVG Map Icons, mirror of repo on Gitlab
Stars: ✭ 89 (-92%)
Mutual labels:  cartography, openstreetmap
psycopgr
A Python wrapper of pgRouting for routing from nodes to nodes on real map.
Stars: ✭ 24 (-97.84%)
Mutual labels:  openstreetmap, dijkstra
mapus
A map tool with real-time collaboration πŸ—ΊοΈ
Stars: ✭ 2,687 (+141.64%)
Mutual labels:  drawing, openstreetmap
Vector Datasource
Tilezen vector tile service - OpenStreetMap data in several formats
Stars: ✭ 427 (-61.6%)
Mutual labels:  cartography, openstreetmap
Algorithm
algorithm library
Stars: ✭ 55 (-95.05%)
Mutual labels:  algorithm
Awesome Java Leetcode
πŸ‘‘ LeetCode of algorithms with java solution(updating).
Stars: ✭ 8,297 (+646.13%)
Mutual labels:  algorithm

Dijkstra Cartography

Introduction

I was fascinated by the project "Roads to Rome" by Moovellab but sad that it isn't opensource. Helped by this project (thanks @tristramg ) I started to build my own map.

I did not have any GIS background but it was very interesting to discover what we can do with. The code isn't very good (I'm not a C++ guru).

The project is named "Dijkstra Cartography" but sometimes BFS algorithm is better (if all the edges have the same weight).

This code can be useful for cartographer, as I found a lot of errors for the river Amazon (see here) or.. to have your own poster πŸ˜‰.

Extract

You may not want to use the planet.osm file (644GB - all the openstreetmap data in one file). Choose the right file here and extract what you really need with openstreetmap's tools : osmconvert, osmfilter, osmosis, osmium...

One interesting way is that you can extract all the data within a polygon with osmconvert, and here are some cities polygons.

Routing

Map Routing system used
Paris Graphhopper - "Dijkstrabi"
Amazon Dijkstra's algorithm
Railway OSRM
Flights Dijkstra's algorithm

The first thing to do is to gather the statistics of usage of all paths : for each location, execute the routing algorithm you chose to your root location (your home for example). Merge all and sort the data by the most used path.

Projections

Map Projection
Paris Lambert 93-I EPSG:27571
Amazon ESRI:102032 (South America Equidistant Conic)
Railway Mercator
Flights WSG84

You can follow this guide, search SpatialReference or ESPG.io.

Drawing

Considering the data is sorted and well projected.

The width and height of the image are defined like this :

width = (maxX-minX)/scale;
height = (maxY-minY)/scale;

To draw these paths, I used this function (plotted using R) : ./results/function.jpg

as it gives me a percent (between [0;1] here) of how the line width must be important. Also I can accentuate the decreasing by modifying parameters inside exp().

I used cairo and I was really suprised that I can understand these map without using any shapefile.

Details for each map

Bonus

./results/paris.gif

License

See here.

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].