Map data
Teslita's Speedometer draws its maps from OpenStreetMap data, © OpenStreetMap contributors, available under the Open Database License (ODbL) 1.0. See openstreetmap.org/copyright.
We make two databases from OpenStreetMap and use them in our app. As the ODbL asks, this page says how each is made, so that anyone can make the same from OpenStreetMap themselves. Both are refreshed every week for Europe and every month for the other continents, from the extracts at download.geofabrik.de. Both are licensed under the ODbL 1.0.
1. Main roads and lanes
With osmium, we keep the ways that carry lane arrows, and every main road:
osmium tags-filter region.osm.pbf \ w/turn:lanes w/turn:lanes:forward w/turn:lanes:backward \ w/highway=motorway,motorway_link,trunk,trunk_link,primary,primary_link,secondary,secondary_link,tertiary,tertiary_link osmium export --geometry-types=linestring -f geojsonseq
From each way we keep its geometry, highway, the direction of travel (oneway, with roundabouts and motorways one-way unless tagged otherwise), turn:lanes / turn:lanes:forward / turn:lanes:backward, the lane counts (lanes, lanes:forward, lanes:backward, raised to at least as many lanes as the arrows list), width in metres where it is a plain number of metres, and whether it is in a tunnel (tunnel, covered). Nothing is added from other sources.
2. Map tiles
Zoom-14 vector tiles, built with Planetiler (generate-custom) from the schema below. The sea comes from the water polygons at osmdata.openstreetmap.de, which are themselves made from OpenStreetMap's coastline. Each extract is cut into pieces with osmium extract --strategy=complete_ways, each with a margin of 0.05° of its neighbours, and each piece is built on its own with --bounds set to its own box. The pieces are cut only so that the build fits our server's memory, and they do not change the result.
schema_name: Teslita Speedometer
schema_description: The streets round the car for the Speedometer's 3D road and Map layouts
attribution: '<a href="https://www.openstreetmap.org/copyright">© OpenStreetMap contributors</a>'
args:
osm_path:
description: The OpenStreetMap extract (.osm.pbf) to build from
default: region.osm.pbf
water_path:
description: osmdata.openstreetmap.de's water-polygons-split-3857.zip
default: water-polygons-split-3857.zip
minzoom: 14
maxzoom: 14
sources:
osm:
type: osm
local_path: '${ args.osm_path }'
sea:
type: shapefile
local_path: '${ args.water_path }'
projection: EPSG:3857
layers:
- id: water
features:
- source: sea
geometry: polygon
- source: osm
geometry: polygon
include_when:
natural: water
waterway: [riverbank, dock]
landuse: [reservoir, basin]
exclude_when:
covered: 'yes'
tunnel: __any__
- id: landcover
features:
- source: osm
geometry: polygon
include_when:
natural: [wood, grassland, heath, scrub]
landuse: [forest, grass, meadow, village_green, recreation_ground]
leisure: [park, garden]
attributes:
- key: class
value:
wood:
natural: wood
landuse: forest
grass: otherwise
- id: building
features:
- source: osm
geometry: polygon
include_when:
building: __any__
exclude_when:
building: ['no', 'none']
location: [underground]
attributes:
- key: height
tag_value: height
type: double
- key: min_height
tag_value: min_height
type: double
- key: levels
tag_value: building:levels
type: double
- key: min_level
tag_value: building:min_level
type: double
- id: transportation
features:
- source: osm
geometry: line
include_when:
highway:
- motorway
- motorway_link
- trunk
- trunk_link
- primary
- primary_link
- secondary
- secondary_link
- tertiary
- tertiary_link
- residential
- unclassified
- living_street
- road
- service
exclude_when:
area: 'yes'
# car parks, driveways and drive-throughs are not streets (never drawn)
service: [parking_aisle, driveway, drive-through]
attributes:
- key: class
value:
motorway:
highway: [motorway, motorway_link]
trunk:
highway: [trunk, trunk_link]
primary:
highway: [primary, primary_link]
secondary:
highway: [secondary, secondary_link]
tertiary:
highway: [tertiary, tertiary_link]
minor:
highway: [residential, unclassified, living_street, road]
service: otherwise
- key: ramp
value: 1
include_when:
highway: '%_link'
# 1 one-way along the line, -1 against it, 0 two-way. A roundabout and a
# motorway are one-way unless tagged otherwise.
- key: oneway
value:
- if:
oneway: ['-1', reverse]
value: -1
- if:
oneway: ['yes', '1', 'true']
value: 1
- if:
oneway: ['no', '0', 'false', reversible, alternating]
value: 0
- if:
junction: [roundabout, circular]
highway: [motorway, motorway_link]
value: 1
- else: 0
- key: brunnel
value:
tunnel:
tunnel: ['yes', building_passage, culvert]
bridge:
bridge: ['yes', viaduct, cantilever, movable, trestle]
- key: name
tag_value: name
- key: ref
tag_value: ref
include_when:
highway: [motorway, motorway_link, trunk, trunk_link, primary, primary_link]
Asking for a copy
To get a copy of either database, write to hello@teslita.com.
Teslita is an independent service, not affiliated with Tesla, Inc. or the OpenStreetMap Foundation. Back to Teslita · Imprint