HUB
Sign inSign up
mvtbenchdb logo

sourcepole/mvtbenchdb

By sourcepole

•Updated over 2 years ago

DB for MVT Benchmark

Image
0

5.5K

sourcepole/mvtbenchdb repository overview

⁠MVT Benchmark

Benchmark for MVT vector tile creation and delivery from a PostGIS database.

The benchmark uses a minimal subset of the NaturalEarth⁠ 4.1 data set.

Measurement targets:

  • How long does it take to generate all tiles (single node / multiple nodes)
  • How many requests/s does the tile server deliver in web server mode

⁠Tileset definition

  • Tileset name: ne_countries
  • Maxzoom level for tile data: 6
  • Tile size: 4096
  • Tile format: MVT V2 gzipped (gzip recommended, but not mandatory)
  • SRS (data and tiles): EPSG:3857 (Web Mercator)

Layer definition:

NameGeom. typeBufferSimplifyTableAttributesConditions
countryMULTIPOLYGON3yesne_10m_admin_0_countriesadm0_a3, mapcolor7min_zoom <= {z}
country-namePOINT0none_10m_admin_0_country_pointsabbrev, name-
geo-lines (z=1..4)MULTILINESTRING0none_50m_geographic_linesname-
geo-lines (z=5..6)MULTILINESTRING0none_10m_geographic_linesname-
land-border-countryMULTILINESTRING0yesne_10m_admin_0_boundary_lines_land-min_zoom <= {z}
stateMULTILINESTRING0yesne_10m_admin_1_states_provinces_linesadm0_a3min_zoom <= {z}

⁠Display style

A reference Mapbox GL JS style for the produced tiles is natural-earth-countries.json⁠.

Screenshot:

natural-earth-countries

⁠Run benchmark

Requirements:

  • Make
  • Docker & docker-compose
  • gnuplot

Quick benchmark:

make quick_bench

Full benchmark:

make bench

Graph:

x-www-browser bench/results/*.jpg

Display map:

cd t-rex; make mapviewer

or

cd MapServer; make mapviewer

Open http://localhost:8088/map-countries.html⁠

Avoid browser caching by using a private window in Firefox e.g.

⁠Add a new software

  • Copy the skeletion directory to a new directory named after your software
  • Add a configuration for your software to create a tileset following the definition above
  • Adapt the Makefile or add a script to run the benchmarks with your software, using docker containters, if possible
  • Add calls to the project Makefile from the top level Makefile
  • Open a pull request on Github

⁠Reference database

The database can be started within a Docker container with

docker-compose up -d mvtbenchdb

PostgreSQL is running on Port 5432 within Docker and is mapped to 127.0.0.1:5439 on the Docker host.

  • DB user: mvtbench
  • DB password: mvtbench

Connection example:

PGPASSWORD=mvtbench psql -h 127.0.0.1 -p 5439 -U mvtbench

⁠Local DB Setup

# Set Postgresql environment variables when needed: PGHOST, PGPORT, PGUSER, PGPASSWORD
cd data
make createdb

Import GeoPackage with ogr2ogr:

make gpkgrestore
Tag summary
Recent tags
Content type
Image
Digest
sha256:c9b184e7d…
Size
240.3 MB
Last updated
over 2 years ago
docker pull sourcepole/mvtbenchdb:latest