Skip to content

t-rex-tileserver/t-rex-natural-earth-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

t-rex examples using NaturalEarth data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published