Table of Contents
Tình hình là mình muốn cắt Mbtiles
theo mask cơ, cơ mà tìm không ra, chỉ tìm được cắt theo bbox thôi. Tạm thời note lại vậy.
tilelive-copy \
--minzoom=0 --maxzoom=14 \
--bounds="5.9559,45.818,10.4921,47.8084" \
planet.mbtiles my-extract-for-switzerland.mbtiles
Preparation8
- Download the planet file
- Install tilelive and MBTiles support.
npm install -g @mapbox/tilelive @mapbox/mbtiles
Choose your Bounding Box8
- Visit boundingbox.klokantech.com and drag a rectangle around your desired area.
- Copy the bounding box in CSV format
Create Extract8
To create an extract, use the tilelive-copy
utility. It takes a bounding box and a MBTiles file as input and creates an extract clipped to the bounding box.
Replace the bounding box in the following command with your bounding box.
tilelive-copy\
--minzoom=0 --maxzoom=14\
--bounds="5.9559,45.818,10.4921,47.8084"\
planet.mbtiles my-extract-for-switzerland.mbtiles
It was ultimately a version problem. With NodeJS V 9.11.1 64 bit everything was possible without problems.
So:
- Install NodeJS V 9.11.1 64 Bit
- install npm
- npm install -g @mapbox/tilelive @mapbox/mbtiles
and its works:
tilelive-copy --bounds="5.9559,45.818,10.4921,47.8084" 18.mbtiles switzerland_18.mbtiles