User:Kannix/vector-tiles

From OpenStreetMap Wiki
Jump to navigation Jump to search

fetch data

 <osm-script>
  <union>
  <union>
   <query type="way">
     <has-kv k="CEMT"/>
     <bbox-query s="26.5" n="64.5" w="-8.7" e="57.5"/>
   </query>
   <query type="way">
     <has-kv k="motorboat" v="yes"/>
     <bbox-query s="26.5" n="64.5" w="-8.7" e="57.5"/>
   </query>
  </union>
   <recurse type="way-node"/>
  </union>
  <print  mode="meta"/>
 </osm-script>

generator

  • https://github.com/mapbox/tippecanoe
    • tippecanoe -o cemt_EU_2020_uc.mbtiles -B10 -xsource --no-tile-compression cemt_EU_2020.geojson
    • -B10 include all features at zomm level 10
    • -xsource drop feature 'source'

server

 "layers": {
   "cemt-vector-2020": {
     "provider": 
     {
       "name": "mbtiles", 
       "tileset": "/var/www/vhosts/grade.de/tiles.grade.de/cemt_EU_2020_uc.mbtiles"
     },
     "cache lifespan": 43200
   }
 }

viewer

debugging vetor tiles

toDo

  • automatisation
    • download via overpass
    • conversion osm > geojson
    • mbtiles generation