- Notifications
You must be signed in to change notification settings - Fork0
Static maps generator for dynamic data
License
NotificationsYou must be signed in to change notification settings
weglide/casper
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Casper generates static map images from hybrid map sources (e.g. raster tiles and mapbox vector tiles) and geojson data from postgres.
go build.&& ./casper
id
: The flight id in the weglide DBth
: Thickness of line string
go test
The test cases cover the following scenarios (can be executedwithout a connection to a weglide DB):
- Flight from Berlin to New York
- Flight from Berlin to Hamburg
- Flight from Berlin to Barcelona
- Flight from Berlin to Rio
- Flight from Frankfurt to Marburg
Clone the
wg_main
repositoryStart all the services
Make sure that you expose the postgres database with a port mapping:e.g.
ports: - 5432:5432
With this approach you can connect during the development to the database and don't have to create a docker container separately just to connect to the database.
Define the following environment variables:
export LOCAL=TRUE export POSTGRES_HOST=127.0.0.1 export POSTGRES_DB=weglide export POSTGRES_USER=weglide_user export POSTGRES_PASS=test export POSTGRES_PORT=5432
- Canvas starts at top left corner!
- Get Flight ID
- Get bbox (bounding box) and linestring from weglide DB
- Calculate required tiles based on bbox
- Download tiles
- Merge all downloaded tiles to one image
- Plot flight
- Crop image