Kartografski podatki
Merilnik hitrosti v Tesliti izrisuje zemljevide iz podatkov OpenStreetMap. © sodelavci OpenStreetMap. Podatki so na voljo pod licenco Open Database License (ODbL) 1.0. Več informacij: openstreetmap.org/copyright.
Iz podatkov OpenStreetMap izdelujemo dve podatkovni zbirki, ki ju uporabljamo v aplikaciji. Kot zahteva ODbL, tukaj opisujemo postopek, da lahko vsakdo iz istih podatkov sam izdela enaki zbirki. Obe posodabljamo z izvlečki s spletnega mesta download.geofabrik.de, za Evropo vsak teden, za druge celine vsak mesec. Za obe velja licenca ODbL 1.0.
1. Glavne ceste in prometni pasovi
Z orodjem osmium obdržimo odseke, ki imajo oznake smernih puščic za posamezne pasove, in vse glavne ceste:
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
Za vsak odsek obdržimo geometrijo, highway, smer vožnje (oneway, pri čemer so krožišča in avtoceste enosmerni, če ni označeno drugače), puščice po pasovih (turn:lanes / turn:lanes:forward / turn:lanes:backward), število pasov (lanes, lanes:forward, lanes:backward, povečano vsaj na število pasov na seznamu puščic), širino width, če je zapisana kot število v metrih, in oznaki za predore oziroma pokrite odseke (tunnel, covered). Podatkov iz drugih virov ne dodajamo.
2. Kartografske ploščice
Vektorske ploščice za povečavo 14 izdelamo z orodjem Planetiler (generate-custom) po spodnji shemi. Morje prikazujejo poligoni vodnih površin s spletnega mesta osmdata.openstreetmap.de, ki izhajajo iz obale v OpenStreetMap. Vsak izvleček razdelimo z ukazom osmium extract --strategy=complete_ways, pri čemer se deli s sosednjimi prekrivajo za 0,05°. Vsak del obdelamo posebej in z možnostjo --bounds določimo njegove meje. Delitev je potrebna zaradi razpoložljivega pomnilnika strežnika in ne spremeni rezultata.
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]
Kako zaprositi za kopijo
Za kopijo katere koli zbirke pišite na hello@teslita.com.
Teslita je neodvisna storitev in ni povezana z družbo Tesla, Inc. ali fundacijo OpenStreetMap Foundation. Nazaj na Teslito · Podatki o izdajatelju