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.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
maps
.gitattributes
README.md
natural-earth-countries.toml
natural-earth.toml

README.md

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.

Screenshot

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:

http://127.0.0.1:6767/map/map.html

Run country example

Start tile server:

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

Open map:

http://127.0.0.1:6767/map/map-countries.html
You can’t perform that action at this time.