Code Monkey home page Code Monkey logo

mvt-benchmark-1's Introduction

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
  • SRS (data and tiles: EPSG:3857 (Web Mercator)

Layer definition:

Name Geom. type Buffer Simplify Table Attributes Conditions
country MULTIPOLYGON 3 yes ne_10m_admin_0_countries adm0_a3, mapcolor7 min_zoom <= {z}
country-name POINT 0 no ne_10m_admin_0_country_points abbrev, name -
geo-lines (z=1..4) MULTILINESTRING 0 no ne_50m_geographic_lines name -
geo-lines (z=5..6) MULTILINESTRING 0 no ne_10m_geographic_lines name -
land-border MULTILINESTRING 0 yes ne_10m_admin_0_boundary_lines_land - min_zoom <= {z}
state MULTILINESTRING 0 yes ne_10m_admin_1_states_provinces_lines adm0_a3 min_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 results/benchmark.jpg

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

mvt-benchmark-1's People

Contributors

pka avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.