Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vokkim/xyz-to-mbtiles
NodeJS utility to fetch map tiles to MBTiles format
https://github.com/vokkim/xyz-to-mbtiles
Last synced: 2 months ago
JSON representation
NodeJS utility to fetch map tiles to MBTiles format
- Host: GitHub
- URL: https://github.com/vokkim/xyz-to-mbtiles
- Owner: vokkim
- License: mit
- Created: 2017-07-04T10:22:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-15T19:43:11.000Z (about 4 years ago)
- Last Synced: 2024-07-05T10:45:25.602Z (3 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 18
- Watchers: 6
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# XYZ to MBTiles utility
NodeJS utility to fetch map tiles to [MBTiles](https://github.com/mapbox/mbtiles-spec) format.
Modified copy of spaghetti from [wmts-to-mbtiles](https://github.com/vokkim/wmts-to-mbtiles).
## Usage
```
Usage: xyz-to-mbtiles [options]Options:
-h, --help output usage information
--output [mbtiles] Output file
--zoom [zoom] Zoom level
--format [format] Tile format (png)
--minzoom [minzoom] Min zoom level
--maxzoom [maxzoom] Max zoom level
--concurrency [concurrency] Number of concurrent requests
--retry [retry] Retry count to fetch for failed tiles
--input [url] tilemap URL
--bbox [w s e n] Latitude and longitude values, eg. "23.411 59.731 26.850 60.562"
--header [header] Header, eg. "Referer:https//mywebapp.com/
--token [token] Optional token for tilemap URL
```Example:
```
xyz-to-mbtiles \
--input 'https://tileservice.com/{z}/{x}/{y}?authToken={token}' \
--output 'output.mbtiles' \
--header 'Referer:https://tileservice.com/' \
--header 'Origin:https://tileservice.com' \
--retry 3 \
--minzoom 4 \
--maxzoom 16 \
--token 'MYTOKEN' \
--bbox '23.411,59.731,26.850,60.562'
```For easy bbox, use for example: http://bboxfinder.com/
### Preview result
Install [mbview](https://github.com/mapbox/mbview):
npm install -g mbview
Run `mbview`:
mbview --port 4999 output.mbtiles## License
MIT