Skip to content
t-rex examples using NaturalEarth data
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

t-rex NaturalEarth example

This repo contains t-rex examples using NaturalEarth data.

The main example uses the natural-earth-quickstart style from the Tegola web demo.


DB Setup

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

From GeoPackage

make gpkgrestore

From raw data

Data: NaturalEarth 4.1 (Site / Github) is used as test data.

make data import import_points optimize

Run quickstart example

Set TREX_DATASOURCE_URL variable according to your DB setup.

DB connection via socket:

export TREX_DATASOURCE_URL=postgresql://$USER@%2Frun%2Fpostgresql/naturalearth4

DB connection via TCP:

export TREX_DATASOURCE_URL=postgresql://user:pass@localhost/naturalearth4

Start tile server:

t_rex serve --config natural-earth.toml

Open map:

Run country example

Start tile server:

t_rex serve --config natural-earth-countries.toml

Open map:
You can’t perform that action at this time.