This Docker package combines the ogr2ogr tools from GDAL with the Felt version of Tippecanoe and the go-pmtiles tool for geospatial ETLing.
Use this package to extract/convert your geospatial files with ogr2ogr and create an MBTiles file in a single Docker command.
- Edit the example environment file (
postgis.env) with your own values:
PGHOST=postgres
PGUSER=postgres
PGPASSWORD=postgres
PGDATABASE=postgres- Edit the example Bash file (
download_table.sh) with your table information:
ogr2ogr \
-f FlatGeoBuf example.fgb \
PG:"" -sql "SELECT name, the_geom FROM test_table" && \
tippecanoe \
-zg \
-o test_table.mbtiles \
--drop-densest-as-needed \
example.fgb && \
rm ./example.fgb
echo "Done!"- Run
ogr2ograndtippecanoein Docker:
docker run \
-v `pwd`:`pwd` \
-w `pwd` -i -t \
jimmyrocks/gdaltippe:latest \
--env-file ./postgis.env \
bash ./download_table.sh- You should now have a file named
test_table.mbtilesin your present working directory.