Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Static maps generator for dynamic data

License

NotificationsYou must be signed in to change notification settings

weglide/casper

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.

Build and run

go build.&& ./casper

CLI Arguments

  • id: The flight id in the weglide DB
  • th: Thickness of line string

Test Cases

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

Prepare Development

  1. Clone thewg_main repository

  2. Start all the services

  3. 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.

  4. 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!

Example Image

Data flow

  1. Get Flight ID
  2. Get bbox (bounding box) and linestring from weglide DB
  3. Calculate required tiles based on bbox
  4. Download tiles
  5. Merge all downloaded tiles to one image
  6. Plot flight
  7. Crop image

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp