place <- place
boundary <- boundary
route <- route
structure <- power, man_made, barrier, emergency, amenity=[bench, post_box, telephone…], advertising, military, playground
poi <- shop, tourism, historic, office, amenity=[other], healthcare, craft
transport <- highway, railway, aerialway, traffic_sign*, public_transport, amenity=bus_station
indoor <- indoor*, entrance*
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Daemon that renders map tiles using mapnik | |
Documentation=man:renderd | |
After=network.target auditd.service | |
[Service] | |
RuntimeDirectory=renderd | |
RuntimeDirectoryMode=0755 | |
ExecStart=/usr/local/bin/renderd -f -c /usr/local/etc/renderd.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This can be used to serialise the results of a Eureka form to JSON | |
// requires AnyCodable from https://github.com/Flight-School/AnyCodable | |
let results:[String:AnyCodable] = form.values().mapValues { v in | |
return AnyCodable(v) | |
} | |
let encoder = JSONEncoder() | |
encoder.outputFormatting = .prettyPrinted | |
let json = try! encoder.encode(results) | |
print(String(data: json, encoding: .utf8)!) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install OSM rendering stack on CentOS 7 | |
# Richard Fairhurst, January 2020 | |
yum -y install epel-release | |
# Postgres/GDAL | |
rpm -Uvh https://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm | |
yum -y install postgresql94-server postgresql94-devel postgis24_94 postgis24_94-docs postgis24_94-utils gdal30 gdal30-devel | |
# GCC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mapnik style profiler | |
# ruby style_profiler.rb /usr/local/share/maps/style/stylesheet.xml coloured_relief,hillshade,relief,combined_relief 8.1948 46.8982 8.4502 47.0753 | |
require '/usr/local/share/ruby/ffi-mapnik/lib/ffi-mapnik.rb' | |
require 'nokogiri' | |
require 'proj4' | |
require 'benchmark' | |
xml_fn = ARGV[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Combine all hillshade layers into a single GeoTIFF | |
# Requires gdalcopyproj.py (which uses GDAL Python bindings) | |
require '/usr/local/share/ruby/ffi-mapnik/lib/ffi-mapnik.rb' | |
require 'nokogiri' | |
Mapnik.register_datasources("/usr/local/lib/mapnik/input") | |
Mapnik.register_fonts("/usr/local/share/maps/style/fonts") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Dijkstra and plain A* are generally not included here as there are thousands of | |
implementations, though I've made an exception for rare Ruby and Crystal versions, | |
and for Thor, Mapzen's enhanced A*. ) | |
A* Ruby https://github.com/georgian-se/shortest-path | |
A* Crystal https://github.com/petoem/a-star.cr | |
A* (bidirectional with shortcuts) C++ https://github.com/valhalla/valhalla | |
NBA* JS https://github.com/anvaka/ngraph.path | |
NBA* Java https://github.com/coderodde/GraphSearchPal | |
NBA* Java https://github.com/coderodde/FunkyPathfinding |