https://github.com/azavea/tilertwo
Publish static vector tile sets to S3 from GeoJSON with a single command
https://github.com/azavea/tilertwo
docker export-tiles geojson mb-util mbtiles mvt tippecanoe vector-tiles
Last synced: 5 days ago
JSON representation
Publish static vector tile sets to S3 from GeoJSON with a single command
- Host: GitHub
- URL: https://github.com/azavea/tilertwo
- Owner: azavea
- License: apache-2.0
- Created: 2019-07-16T13:15:07.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-27T15:04:01.000Z (over 5 years ago)
- Last Synced: 2024-04-15T02:10:26.599Z (about 1 year ago)
- Topics: docker, export-tiles, geojson, mb-util, mbtiles, mvt, tippecanoe, vector-tiles
- Language: Python
- Homepage:
- Size: 178 KB
- Stars: 5
- Watchers: 13
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tiler Two
This repository contains a Docker image that can be used to take a GeoJson file or directory
of line-delimited GeoJson and generate a static vector tile set from it, using almost any
combination of available [Tippecanoe](https://github.com/mapbox/tippecanoe) options.If you're not sure about which of the extensive Tippecanoe options to try first, a good default for most datasets is:
```
--drop-densest-as-needed -zg --hilbert
```First, ensure [Docker](https://www.docker.com/get-started) and [Docker Compose](https://docs.docker.com/compose/install/) 3.0+ are installed. Then build the container with:
```bash
docker-compose build
```For complete documentation, run `docker-compose run --rm tiler-two --help`
## Examples
### Only generate an mbtiles file using relative paths
The mbtiles file will be placed in the root of the mounted data volume.
```bash
docker-compose run --rm -v $(pwd)/sample-data:/data tiler-two \
file:///data/ne_110m_admin_0_countries.geojson \
file:///data/tiles/ne_110m_admin_0_countries \
--no-clean \
--skip-export \
--tmp /data \
--tippecanoe-opts "-l ne_110m_admin0 --drop-densest-as-needed -z14"
```### Export tiles to S3 from a local geojson file
```bash
AWS_PROFILE='' docker-compose run --rm \
-v $(pwd)/sample-data:/data tiler-two \
file:///data/ne_110m_admin_0_countries.geojson \
s3://bucket/path/to/tiles/ne_110m_admin_0_countries \
--tippecanoe-opts "--drop-densest-as-needed -zg --coalesce --reorder --hilbert"
```## Environment Variables
### `AWS_PROFILE`
If you're exporting tiles to S3, set this and mount your `~/.aws` directory to `/home/tilertwo/.aws` in the container.
If you run the container with the included `docker-compose` script, the aws directory mount is handled for you.
### `TIPPECANOE_VERSION`
Defaults to `1.34.3`. Update this and rebuild the image if you'd prefer to install a different version of Tippecanoe.