Skip to content

Instantly share code, notes, and snippets.

@attentive
Created November 26, 2018 03:11
Show Gist options
  • Save attentive/8c848f3efa0ff224cc15f9bd1c192b5d to your computer and use it in GitHub Desktop.
Save attentive/8c848f3efa0ff224cc15f9bd1c192b5d to your computer and use it in GitHub Desktop.
Connect to PostGIS and export vector tiles
# This rigmarole should connect successfully first
ogrinfo PG:"dbname='databasename' host='addr' port='5432' user='x' password='y'" layername
# Requires GDAL 2.3 or higher (current stable Ubuntu packages for Bionic are only 2.2.x)
ogr2ogr -f MVT out.mbtiles PG:"dbname='databasename' host='addr' port='5432' user='x' password='y'" layername
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment