### Inspect a PMTiles archive
Source: https://docs.protomaps.com/guide/getting-started
Use the pmtiles CLI to inspect the metadata of a daily basemap build.
```bash
pmtiles show https://build.protomaps.com/20260526.pmtiles
```
--------------------------------
### Example PMTiles URL
Source: https://docs.protomaps.com/deploy
An example of a PMTiles archive URL.
```text
https://s3.mycloudstorage.com/world.pmtiles
```
--------------------------------
### Extract a subset of a planet file by bounding box
Source: https://docs.protomaps.com/guide/getting-started
Create a subset of a planet file with tiles matching a specific bounding box.
```bash
pmtiles extract https://build.protomaps.com/20260526.pmtiles my_area.pmtiles --bbox=4.742883,51.830755,5.552837,52.256198
```
--------------------------------
### Extract a subset of a planet file by max zoom
Source: https://docs.protomaps.com/guide/getting-started
Create a subset of a planet file with tiles up to a specified maximum zoom level.
```bash
pmtiles extract https://build.protomaps.com/20260526.pmtiles planet_z6.pmtiles --maxzoom=6
```
--------------------------------
### pmtiles serve command example
Source: https://docs.protomaps.com/pmtiles/cli
Example of the 'serve' command to expose tilesets as a ZXY endpoint.
```bash
pmtiles serve .
```
--------------------------------
### pmtiles show command examples
Source: https://docs.protomaps.com/pmtiles/cli
Examples of the 'show' command for pmtiles.
```bash
pmtiles show INPUT.pmtiles
```
```bash
pmtiles show INPUT.pmtiles --bucket=s3://BUCKET_NAME
```
```bash
pmtiles show INPUT.pmtiles --header-json
```
```bash
pmtiles show INPUT.pmtiles --metadata
```
--------------------------------
### Install @protomaps/basemaps
Source: https://docs.protomaps.com/basemaps/maplibre
Command to install the @protomaps/basemaps NPM package.
```bash
npm install @protomaps/basemaps
```
--------------------------------
### Example CDN Tile URLs
Source: https://docs.protomaps.com/deploy
Examples of how PMTiles archives can be served as standard Z/X/Y tile URLs via a CDN.
```text
https://tiles.myglobalcdn.com/myvectordata/{z}/{x}/{y}.mvt
https://tiles.myglobalcdn.com/myrasterdata/{z}/{x}/{y}.png
```
--------------------------------
### Install pmtiles library
Source: https://docs.protomaps.com/pmtiles/maplibre
Install the pmtiles JavaScript library using npm.
```bash
npm install pmtiles
```
--------------------------------
### CloudFront URL Examples
Source: https://docs.protomaps.com/deploy/aws
Example URLs for accessing the TileJSON and tile endpoints after CloudFormation deployment.
```text
https://SUBDOMAIN.cloudfront.net/TILESET.json # TileJSON for MapLibre
https://SUBDOMAIN.cloudfront.net/TILESET/{z}/{x}/{y}.{ext}
```
--------------------------------
### pmtiles tile command example
Source: https://docs.protomaps.com/pmtiles/cli
Example of the 'tile' command to output a single tile's contents.
```bash
pmtiles tile INPUT.pmtiles 0 0 0
```
--------------------------------
### pmtiles merge command examples
Source: https://docs.protomaps.com/pmtiles/cli
Examples of the 'merge' command for combining disjoint archives.
```bash
pmtiles merge INPUT_1.pmtiles INPUT_2.pmtiles OUTPUT.pmtiles
```
```bash
pmtiles merge INPUT_1.pmtiles INPUT_2.pmtiles INPUT_3.pmtiles OUTPUT.pmtiles
```
--------------------------------
### Install via npm
Source: https://docs.protomaps.com/basemaps/leaflet
Command to install the protomaps-leaflet library using npm for use with a bundler.
```bash
npm add protomaps-leaflet
```
--------------------------------
### pmtiles extract command examples
Source: https://docs.protomaps.com/pmtiles/cli
Examples of the 'extract' command for creating smaller archives.
```bash
pmtiles extract INPUT.pmtiles OUTPUT.pmtiles --bbox=MIN_LON,MIN_LAT,MAX_LON,MAX_LAT
```
```bash
pmtiles extract INPUT.pmtiles OUTPUT.pmtiles --region=REGION.geojson
```
```bash
pmtiles extract https://example.com/INPUT.pmtiles OUTPUT.pmtiles --maxzoom=MAXZOOM
```
```bash
pmtiles extract INPUT.pmtiles OUTPUT.pmtiles --maxzoom=MAXZOOM --bucket=s3://BUCKET_NAME
```
--------------------------------
### Example PMTiles URLs
Source: https://docs.protomaps.com/deploy/google-cloud
Example URLs to access the tileset served by the Cloud Run container. Includes the base URL for vector tiles and a URL for TileJSON.
```http
https://EXAMPLE.REGION.run.app/TILESET/0/0/0.mvt
```
```http
https://EXAMPLE.REGION.run.app/TILESET.json # TileJSON,requires --public-url to be set
```
--------------------------------
### pmtiles verify command example
Source: https://docs.protomaps.com/pmtiles/cli
Example of the 'verify' command to check archive integrity.
```bash
pmtiles verify INPUT.pmtiles
```
--------------------------------
### Zürich Example
Source: https://docs.protomaps.com/basemaps/localization
Example of a name with only the Latin script.
```text
name = Zürich
(script absent)
(name2 absent)
(script2 absent)
(name3 absent)
(script3 absent)
```
--------------------------------
### Example Application HTML
Source: https://docs.protomaps.com/guide/security-privacy
A complete HTML example of a map application that avoids third-party data processors, assuming all linked assets are hosted on compliant static storage.
```html
```
--------------------------------
### Casablanca Example
Source: https://docs.protomaps.com/basemaps/localization
Example of a name with Latin, Tifinagh, and Arabic scripts, split into 'name', 'name2', and 'name3'.
```text
name = Casablanca
(script absent)
name2 = ⵜⵉⴳⵎⵉ ⵜⵓⵎⵍⵉⵍⵜ
script2 = Tifinagh
name3 = الدار البيضاء
script3 = Arabic
```
--------------------------------
### Example curl requests for vector tiles and TileJSON
Source: https://docs.protomaps.com/deploy/cloudflare
Demonstrates how to fetch vector tiles and TileJSON using curl.
```bash
curl -v https://subdomain.mydomain.com/FILENAME/0/0/0.mvt
# TileJSON for MapLibre
curl -v https://subdomain.mydomain.com/FILENAME.json
```
--------------------------------
### Hong Kong Example
Source: https://docs.protomaps.com/basemaps/localization
Example of a name with Han and Latin scripts, split into 'name' and 'name2'.
```text
name = 香港
script = Han
name2 = Hong Kong
(script2 absent)
(name3 absent)
(script3 absent)
```
--------------------------------
### Show local archive
Source: https://docs.protomaps.com/pmtiles/cli
Example of showing a local tileset archive.
```sh
pmtiles show test.pmtiles
```
--------------------------------
### Example: Milano (English localization)
Source: https://docs.protomaps.com/basemaps/localization
Demonstrates how place names are displayed for English localization, prioritizing the English name when the local name uses the same script.
```text
Milan
```
--------------------------------
### Raster Tiles Example
Source: https://docs.protomaps.com/pmtiles/openlayers
Example of using PMTiles with OpenLayers for raster tiles (RGB Terrain).
```javascript
import "./style.css";
import { Map, View } from "ol";
import WebGLTile from "ol/layer/WebGLTile";
import { PMTilesRasterSource } from "ol-pmtiles";
import { useGeographic } from 'ol/proj';
const rasterLayer = new WebGLTile({
source: new PMTilesRasterSource({
url:"https://r2-public.protomaps.com/protomaps-sample-datasets/terrarium_z9.pmtiles",
attributions:["https://github.com/tilezen/joerd/blob/master/docs/attribution.md"],
tileSize: [512,512]
})
});
useGeographic();
const map = new Map({
target: "map",
layers: [rasterLayer],
view: new View({
center: [0,0],
zoom: 1,
}),
});
```
--------------------------------
### Dual Language Labels Example
Source: https://docs.protomaps.com/basemaps/localization
Example JSON snippet for a MapLibre Style to display labels in two languages (Dutch and French in this case).
```json
"text-field": [
"case",
[
"all",
["has", "name:nl"],
["has", "name:fr"],
],
// both languages are present
[
"case",
["==", ["get", "name:nl"], ["get", "name:fr"]],
// both languages are identical, only show one
["get", "name:nl"],
// languages not identical, show both
[
"format",
["get", "name:nl"], {},
"\n", {},
["get", "name:fr"], {},
],
],
[
"all",
["!", ["has", "name:nl"]],
["!", ["has", "name:fr"]],
],
// none of the languages is present, use default
["get", "name"],
// only one language is present
["coalesce", "name:nl", "name:fr"]
]
```
--------------------------------
### Vector Tiles Example
Source: https://docs.protomaps.com/pmtiles/openlayers
Example of using PMTiles with OpenLayers for vector tiles (New Zealand buildings).
```javascript
import "./style.css";
import { Map, View } from "ol";
import VectorTile from "ol/layer/VectorTile";
import { PMTilesVectorSource } from "ol-pmtiles";
import { Style, Stroke, Fill } from 'ol/style';
import { useGeographic } from 'ol/proj';
const vectorLayer = new VectorTile({
declutter: true,
source: new PMTilesVectorSource({
url: "https://r2-public.protomaps.com/protomaps-sample-datasets/nz-buildings-v3.pmtiles",
attributions: ["© Land Information New Zealand"],
}),
style: new Style({
stroke: new Stroke({
color: "gray",
width: 1,
}),
fill: new Fill({
color: "rgba(20,20,20,0.9)",
}),
}),
});
useGeographic();
const map = new Map({
target: "map",
layers: [vectorLayer],
view: new View({
center: [172.606201,-43.556510],
zoom: 7,
}),
});
```
--------------------------------
### Content Security Policy Example
Source: https://docs.protomaps.com/guide/security-privacy
Example of an HTML meta tag for a Content Security Policy (CSP) that enforces resource origins and includes directives for MapLibre.
```html
```
--------------------------------
### Caddy CORS Configuration
Source: https://docs.protomaps.com/pmtiles/cloud-storage
Example CORS headers configuration for Caddy when serving PMTiles.
```text
Access-Control-Allow-Methods GET,HEAD
Access-Control-Expose-Headers ETag
Access-Control-Allow-Headers Range,If-Match
Access-Control-Allow-Origin http://example.com
```
--------------------------------
### Rclone Docker usage
Source: https://docs.protomaps.com/pmtiles/cloud-storage
Example of uploading to cloud storage using the rclone Docker image.
```sh
rclone copyto :/ --progress --s3-no-check-bucket --s3-chunk-size=256M
```
--------------------------------
### Cloud storage commands
Source: https://docs.protomaps.com/pmtiles/cli
Examples of using pmtiles with cloud storage buckets (S3, Azure Blob, Google Cloud Storage).
```sh
pmtiles show test.pmtiles --bucket=s3://BUCKET_NAME
```
```sh
pmtiles show test.pmtiles --bucket=azblob://CONTAINER_NAME?storage_account=ACCOUNT
```
```sh
pmtiles show test.pmtiles --bucket=gs://BUCKET_NAME
```
--------------------------------
### S3-compatible storage endpoint
Source: https://docs.protomaps.com/pmtiles/cli
Example of connecting to S3-compatible blob storage outside of AWS.
```sh
pmtiles show test.pmtiles --bucket=s3://BUCKET_NAME?endpoint=https://example.com®ion=auto
```
--------------------------------
### Rclone upload command
Source: https://docs.protomaps.com/pmtiles/cloud-storage
Example of using rclone to copy a file to S3-compatible storage.
```sh
rclone copyto my-filename my-configuration:my-bucket/my-folder/my-filename.pmtiles --progress --s3-chunk-size=256M
```
--------------------------------
### Example: Milano (Greek localization)
Source: https://docs.protomaps.com/basemaps/localization
Illustrates how place names are displayed for Greek localization, including both the Greek name and the local name (Milano) because they use different scripts.
```text
Μιλάνο
Milano
```
--------------------------------
### Subresource Integrity Example
Source: https://docs.protomaps.com/guide/security-privacy
Example of using Subresource Integrity (SRI) to ensure the integrity of a loaded JavaScript library from a third-party CDN.
```html
```
--------------------------------
### Show remote archive
Source: https://docs.protomaps.com/pmtiles/cli
Example of showing a remote tileset archive from a URL.
```sh
pmtiles show https://r2-public.protomaps.com/protomaps-sample-datasets/cb_2018_us_zcta510_500k.pmtiles
```
--------------------------------
### Serve PMTiles locally with http-server
Source: https://docs.protomaps.com/pmtiles
This command installs and runs the http-server package to serve PMTiles files locally, making them accessible via HTTP with CORS support.
```sh
npm install -g http-server
# from the directory containing your .pmtiles file
http-server . --cors
# your file is now available at http://localhost:8080/
```
--------------------------------
### Raster Tile Source Configuration
Source: https://docs.protomaps.com/pmtiles/maplibre
Example JSON configuration for a raster tile source using the pmtiles:// protocol.
```json
{
"sources": {
"protomaps": {
"type": "raster",
"url": "pmtiles://https://example.com/example.pmtiles",
}
}
}
```
--------------------------------
### Vector Tile Source Configuration
Source: https://docs.protomaps.com/pmtiles/maplibre
Example JSON configuration for a vector tile source using the pmtiles:// protocol.
```json
{
"sources": {
"protomaps": {
"type": "vector",
"url": "pmtiles://https://example.com/example.pmtiles",
}
}
}
```
--------------------------------
### Google Cloud CORS configuration using gcloud CLI
Source: https://docs.protomaps.com/pmtiles/cloud-storage
Example commands to view and set CORS configuration for a Google Cloud bucket using the gcloud CLI.
```bash
# view CORS settings
gcloud storage buckets describe gs://my-bucket-name --format="default(cors_config)"
gcloud storage buckets update gs://my-bucket-name --cors-file=cors.json
```
--------------------------------
### Private S3 bucket authentication
Source: https://docs.protomaps.com/pmtiles/cli
Example of authenticating to a private S3-compatible bucket using environment variables.
```sh
export AWS_ACCESS_KEY_ID=MY_KEY
export AWS_SECRET_ACCESS_KEY=MY_SECRET
pmtiles show NAME.pmtiles --bucket=s3://R2_BUCKET_NAME\?endpoint=https://R2_ACCOUNT_ID.r2.cloudflarestorage.com\®ion=auto
```
--------------------------------
### Convert Shapefile to PMTiles using Tippecanoe
Source: https://docs.protomaps.com/pmtiles/create
Example of converting a Shapefile to PMTiles using Tippecanoe, including an intermediate step with ogr2ogr for projection.
```bash
ogr2ogr -t_srs EPSG:4326 cb_2018_us_zcta510_500k.json cb_2018_us_zcta510_500k.shp
# Creates a layer in the vector tiles named "zcta"
tippecanoe -zg --projection=EPSG:4326 -o cb_2018_us_zcta510_500k_nolimit.pmtiles -l zcta cb_2018_us_zcta510_500k.json
```
--------------------------------
### Google Cloud CORS configuration JSON
Source: https://docs.protomaps.com/pmtiles/cloud-storage
Example JSON for Google Cloud CORS configuration.
```json
[
{
"origin": ["https://example.com"],
"method": ["GET","HEAD"],
"responseHeader": ["range","etag","if-match"],
"maxAgeSeconds": 300
}
]
```
--------------------------------
### Using basemaps global variable from CDN
Source: https://docs.protomaps.com/basemaps/maplibre
Example of using the 'basemaps' global variable loaded from a CDN to generate layers.
```javascript
layers: basemaps.layers("protomaps",basemaps.namedFlavor("light"),{lang:"en"})
```
--------------------------------
### Cloudflare R2 CORS configuration using wrangler
Source: https://docs.protomaps.com/pmtiles/cloud-storage
Example command to configure R2 CORS using the wrangler CLI.
```sh
wrangler r2 bucket cors set MY_BUCKET --file file:///home/user/cors_rules.json
```
--------------------------------
### Cloudflare R2 CORS configuration JSON
Source: https://docs.protomaps.com/pmtiles/cloud-storage
Example JSON for configuring CORS on a Cloudflare R2 bucket.
```json
{
"allowed": {
"origins": ["https://example.com"],
"methods": ["GET","HEAD"],
"headers": ["range","if-match"]
},
"exposeHeaders": ["etag"],
"maxAgeSeconds": 3000
}
```
--------------------------------
### MapLibre style object with Protomaps basemap
Source: https://docs.protomaps.com/basemaps/maplibre
Example of a MapLibre style object using Protomaps vector tiles and layers.
```javascript
style: {
version: 8,
glyphs:'https://protomaps.github.io/basemaps-assets/fonts/{fontstack}/{range}.pbf',
sprite: "https://protomaps.github.io/basemaps-assets/sprites/v4/light",
sources: {
"protomaps": {
type: "vector",
url: "pmtiles://https://example.com/example.pmtiles",
// ^-- Remember to prefix the URL with pmtiles://
attribution: 'Protomaps © OpenStreetMap '
}
},
layers: layers("protomaps",namedFlavor("light"),{lang:"en"})
}
```
--------------------------------
### Nginx OPTIONS Preflight Request Configuration
Source: https://docs.protomaps.com/pmtiles/cloud-storage
Example Nginx configuration block to handle CORS preflight requests (OPTIONS method) for PMTiles.
```nginx
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Max-Age' 3600;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
add_header 'Content-Length' 0;
return 204;
}
```
--------------------------------
### Google Cloud Shell CORS configuration
Source: https://docs.protomaps.com/pmtiles/cloud-storage
Example of setting CORS configuration for a Google Cloud bucket using Cloud Shell.
```sh
echo '[{"maxAgeSeconds": 300, "method": ["GET", "HEAD"], "origin": ["https://example.com"], "responseHeader": ["range","etag","if-match"]}]' > cors.json
gcloud storage buckets update gs://my-bucket-name --cors-file=cors.json
```
--------------------------------
### Verify Caddy plugin
Source: https://docs.protomaps.com/deploy/server
Verify that the `pmtiles_proxy` plugin is present in your `caddy` executable.
```shell
caddy list-modules
...
http.handlers.pmtiles_proxy
Non-standard modules: 1
```
--------------------------------
### Build the planet tileset
Source: https://docs.protomaps.com/basemaps/build
Command to build the entire planet tileset, specifying Java heap space, OSM file path, output path, bounds, and temporary directory.
```shell
java -Xmx20g -jar target/protomaps-basemap-HEAD-with-deps.jar --nodemap-type=array --osm_path=/data/planet-latest.osm.pbf --output=/data/planet.pmtiles --bounds=planet --tmpdir=/var/scratch
```
--------------------------------
### Run the tile generation JAR for a local map
Source: https://docs.protomaps.com/basemaps/build
Copies the input OSM data, then runs the protomaps-basemap JAR to generate tiles for a specified area, clipping it to a GeoJSON boundary and downloading necessary resources.
```shell
cp my_area.osm.pbf data/sources/my_area.osm.pbf
java -jar target/protomaps-basemap-HEAD-with-deps.jar --clip=lodz.geojson --area=my_area --download
```
--------------------------------
### Checkout and build the basemaps project JAR
Source: https://docs.protomaps.com/basemaps/build
Clones the basemaps repository, navigates to the tiles directory, and builds the JAR file using Maven.
```shell
git clone https://github.com/protomaps/basemaps
cd basemaps/tiles
mvn clean package
```
--------------------------------
### Backblaze B2 CORS Configuration Sample
Source: https://docs.protomaps.com/pmtiles/cloud-storage
Sample JSON configuration for CORS rules in Backblaze B2.
```json
[
{
"corsRuleName": "allowHeaders",
"allowedOrigins": ["https://example.com"],
"allowedOperations":["b2_download_file_by_name"],
"allowedHeaders": ["range","if-match"],
"maxAgeSeconds": 300
}
]
```
--------------------------------
### Referencing Custom Sprites
Source: https://docs.protomaps.com/basemaps/flavors
Example of referencing a custom spritesheet in a MapLibre JSON style.
```javascript
sprite: "https://example.com/assets/custom"
```
--------------------------------
### Generating Spritesheets
Source: https://docs.protomaps.com/basemaps/flavors
Commands to build the sprite generation binary and create default flavor spritesheets.
```shell
cargo build # creates the binary target/release/spritegen
make # builds all 5 default flavor spritesheets in dist/
# Create a new JSON in flavors/custom.json and customize the colors...
./target/release/spritegen refill.svg flavors/custom.json dist/custom
```
--------------------------------
### Cloud Run Container Arguments
Source: https://docs.protomaps.com/deploy/google-cloud
Arguments to configure the go-pmtiles service when deploying to Cloud Run. This includes specifying the Cloud Storage bucket, cache size, and the public URL for the tileset.
```bash
serve . --bucket=gs://BUCKET --cache-size=500 --public-url=https://example.com
```
--------------------------------
### Verify Download Integrity
Source: https://docs.protomaps.com/basemaps/downloads
Use `b3sum` to verify the integrity of your downloaded file using BLAKE3 hashes provided for daily builds.
```bash
b3sum
```
--------------------------------
### Amazon S3 CORS configuration array
Source: https://docs.protomaps.com/pmtiles/cloud-storage
Example JSON array for S3 CORS configuration.
```json
[
{
"AllowedOrigins": ["https://example.com"],
"AllowedMethods": ["GET","HEAD"],
"AllowedHeaders": ["range","if-match"],
"ExposeHeaders": ["etag"],
"MaxAgeSeconds": 3000
}
]
```
--------------------------------
### Amazon S3 public read policy
Source: https://docs.protomaps.com/pmtiles/cloud-storage
Example S3 bucket policy for public read access.
```json
{
"Version": "2012-10-17",
"Id": "",
"Statement": [
{
"Sid": "PublicRead",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::example-bucket/*"
}
]
}
```
--------------------------------
### Print PMTiles CLI version
Source: https://docs.protomaps.com/pmtiles/cli
Print the version of the command line tool.
```bash
pmtiles version
```
--------------------------------
### Sprite URL configuration
Source: https://docs.protomaps.com/basemaps/maplibre
Example of the 'sprite' key referencing a URL for townspots, highway shields, and point of interest icons.
```javascript
sprite: "https://protomaps.github.io/basemaps-assets/sprites/v4/light"
```
--------------------------------
### Overriding Default Flavors
Source: https://docs.protomaps.com/basemaps/flavors
Example of overriding a default flavor by coloring buildings red using ES6 spread syntax.
```typescript
import { namedFlavor } from "@protomaps/basemaps"
let flavor = {...namedFlavor("light"),buildings:"red"}
```
--------------------------------
### Import Protocol
Source: https://docs.protomaps.com/pmtiles/maplibre
Import the Protocol class from the pmtiles library.
```javascript
import { Protocol } from "pmtiles";
```
--------------------------------
### Serve pmtiles archive
Source: https://docs.protomaps.com/pmtiles/cli
Serve a local directory or archive as a TileJSON endpoint.
```bash
pmtiles serve . --bucket=https://example.com
```
```bash
pmtiles serve / --bucket=s3://BUCKET_NAME
```
```bash
pmtiles serve PREFIX --bucket=s3://BUCKET_NAME
```
--------------------------------
### Glyphs URL configuration
Source: https://docs.protomaps.com/basemaps/maplibre
Example of how the 'glyphs' key references a URL hosting pre-compiled fontstacks for displaying text labels in MapLibre.
```javascript
glyphs:'https://protomaps.github.io/basemaps-assets/fonts/{fontstack}/{range}.pbf'
```
--------------------------------
### Terrain DEM Source Configuration
Source: https://docs.protomaps.com/pmtiles/maplibre
Example JSON configuration for a raster-dem source with Terrarium encoding using the pmtiles:// protocol.
```json
{
"sources": {
"protomaps": {
"type": "raster-dem",
"url": "pmtiles://https://example.com/example.pmtiles",
"encoding": "terrarium"
}
}
}
```
--------------------------------
### Import from @protomaps/basemaps
Source: https://docs.protomaps.com/basemaps/maplibre
Importing necessary functions from the @protomaps/basemaps package.
```javascript
import { layers, namedFlavor } from '@protomaps/basemaps';
```
--------------------------------
### Create PMTiles from PostgreSQL/PostGIS using GDAL
Source: https://docs.protomaps.com/pmtiles/create
Using GDAL's ogr2ogr tool to merge multiple PostgreSQL/PostGIS tables in a schema into a single PMTiles file.
```sh
# Merge all PostgreSQL/PostGIS tables in a schema into a single PMTiles file.
ogr2ogr -dsco MINZOOM=0 -dsco MAXZOOM=15 -f "PMTiles" filename.pmtiles "PG:host=my_host port=my_port dbname=my_database user=my_user password=my_password schemas=my_schema"
```