Giter Club home page Giter Club logo

mapgen's Introduction

Map generator for XCSoar

Codacy Badge

This generates maps in the xcm format for XCSoar a tactical Gliding computer.

The Maps are layered out of a multitude of sources:

  • terrain SRTM
  • topology VMAP0
  • Roads and Towns OSM
  • Waypoints CUP format
  • Airspaces OPENAIR format

Deployment and Development

Ansible

To aid development and deployment an accompaning repositorty was created: XCSoar Mapgen Ansible

The ansible-role can be played back onto a Debian system in order to deploy mapgen. An alternative is the vagrantfile in that repository which allows you to download and install a vm, including provisioning of mapgen. Docker

Container

Frontend

The frontend container contains the cherrypy based service and an nginx based reverse proxy for exposing the mapgen on port 9090 Both processes in the frontend container are started by supervisord.

Frontend produces job files that are put into a shared volume

/opt/mapgen/jobs/<jobid>.queued

Worker

This is the actual map builder, that takes the queued jobs in /opt/mapgen/jobs/jobid and starts processing all the *.queued jobs.

Volumes

These are named volumes inside your docker service.

/opt/mapgen/jobs:

This is the job directory where all jobs get stored

/opt/mapgen/data:

This directory caches all the data from the data repository. WARNING: This volume can take up a lot of space (100GB).

Ports

Port 9090

Build Variables

The Following build variables can be set during build (optional):

  1. GITURL: The git url for the mapgen sources
  2. GITBRANCH: The branch name

Building

in the current directory:

docker-compose build

or with options:

docker-compose build \
--build-arg=GITURL=https://github.com/myuser/mapgen/mapgen.git \
--build-arg=GITBRANCH=myfeature

Starting

docker-compose up -d

mapgen's People

Contributors

codacy-badger avatar csindle avatar kerel-fs avatar lordfolken avatar maxkellermann avatar minad avatar pre-commit-ci[bot] avatar renovate[bot] avatar scottp avatar tazle avatar tobiaslohner avatar turbo87 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mapgen's Issues

mail notifications do not include the proper url to the map

No clickable url in the text, no map name in the text or information has how to regenerate it.

The XCSoar Map Generator has finished your map.
It can be downloaded at /download?uuid=c17dae5e-474c-11ec-8dec-525400c7f7bf
This link is valid for 7 days.

Could not convert string to float in jobID

Jul 30 08:04:52 mapgen mapgen-worker[509]: Could not read timestamp file for job /opt/mapgen/jobs/511d0a4c7fe7a53c29dafb47edd6c49577c445fe.locked
Jul 30 08:04:52 mapgen mapgen-worker[509]: could not convert string to float:

Unicode Chars in Input not supported

Jan 21 13:07:21 mapgen mapgen-worker[24684]: Error: 'ascii' codec can't encode character u'\u015f' in position 1: ordinal not in range(128)
Jan 21 13:07:21 mapgen mapgen-worker[24684]: Traceback (most recent call last):
Jan 21 13:07:21 mapgen mapgen-worker[24684]: File "/opt/mapgen/lib/xcsoar/mapgen/server/worker.py", line 42, in __do_job
Jan 21 13:07:21 mapgen mapgen-worker[24684]: print('Generating map file for job uuid={}, name={}, mail={}'.format(job.uuid, job.description.name, job.description.mail))

map generation error since bullseye upgrade

In some cases this seems to happen:

24 Generating map file for job uuid=7cc6d46e-4537-11ec-b987-525400c7f7bf, name=CentAus, mail=
25 Setting map boundaries: left=133.0725860595703, right=134.66835021972656, top=-23.259148823094606, bottom=-24.113051732520603
26 Adding topology...
27 Creating topology layer city_area ...
28 Reading dataset vmap0/sas ...
29 Reading dataset vmap0/soa ...
30 Generating index file for layer city_area ...
31 Creating topology layer water_area ...
32 Reading dataset vmap0/sas ...
33 Error: Command '['ogr2ogr', '-select', 'nam', '-where', 'hyc=8', '-spat', '133.0725860595703', '-24.113051732520603', '134.66835021972656', '-23.259148823094606', '/opt/mapgen/jobs/7cc6d46e-4537-11ec-b987-525400c7f7bf.working/tmp', '/opt/mapgen/data/vmap0/sas', 'hydro-inland-water-a', '-nln', 'water_a rea']' returned non-zero exit status 1.
34 Traceback (most recent call last):
35 File "/opt/mapgen/lib/xcsoar/mapgen/server/worker.py", line 57, in __do_job
36 generator.add_topology(compressed = description.compressed, level_of_detail = description.level_of_detail)
37 File "/opt/mapgen/lib/xcsoar/mapgen/generator.py", line 117, in add_topology
38 self.__files.extend(shapefiles.create(bounds, self.__downloader, self.__dir_temp, compressed, level_of_detail))
39 File "/opt/mapgen/lib/xcsoar/mapgen/topology/shapefiles.py", line 97, in create
40 __create_layer(bounds, layer, datasets[layer['dataset']], downloader, dir_temp, files, index, compressed)
41 File "/opt/mapgen/lib/xcsoar/mapgen/topology/shapefiles.py", line 59, in __create_layer
42 __create_layer_from_dataset(bounds, layer, datasets[i],
43 File "/opt/mapgen/lib/xcsoar/mapgen/topology/shapefiles.py", line 48, in __create_layer_from_dataset
44 subprocess.check_call(arg)
45 File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
46 raise CalledProcessError(retcode, cmd)

Error in NL map: big sea shows up as land

Hi,

I'm not sure if the issue is in the correct spot here (or should be in /mapdata), apologies if it isn't.

Basically, a huge sea in the Netherlands shows up as land (see picture).

There's quite some glider activity around that area so an improvement would be welcomed by many I guess. I already tried making a smaller map of that area only but it doesn't help. Also, I did a little research and tried to read and edit the .xcm map using Qgis but that didn't work...

If there's a way to fix this by myself, please let me know.

Thanks,
Niels

XCSoar_map_error

Server not generating any maps

Hi, I have been trying for a few hours now and i need to generate a map but it says its "working" then says "Error: Generation failed". I have tried on different browsers, drawing out the boundaries,and manually entering the Lat/long. Nothing works. I read somewhere the server could be reset? I hope we haven't lost this map creation feature XCsoar is a staple to my flying.

Sea represented as land

XCSoar versions having and not having the problem

6.8.17

Expected behavior

Sea area is represented as land

Actual behavior

A part of the IJsselmeer in the Netherlands (between the Afsluitdijk and the Houtribdijk) is falsely represented as land area instead of water.

Steps to reproduce the behavior

Pan to the area and you will sea ;-) how it looks like.

Do you have any idea what may have caused this?

Do you have an idea how to solve the issue?

create central configuration file

currently urls are hardcoded in a lot of locations.
this needs to be centralized and be configurable.
Consider environment variables also, as that is a good way to overrule urls in a container environment.

mapgen not working at all

I used the tool successfully on March 5, but I have been unable to generate anything for the past three days. No matter what combination of options I try, the response is always:

Error: Generation failed!

download.xcsoar.org maps are old

The maps on download.xcsoar.org are old. Most of them predate the migration to 8.33 kHz channels, so it makes sense to update them. The source files for german and dutch waypoints have since been updated, and mapgen produces new files.

Please queue the creation of new files and upload them to download.xcsoar.org

File not found

I ve created a new map for Turkey, but I can only downloaded 2mb part of all file. and it start again a few time, and showed that fault "the file is missing" I can't solve that please help me :)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

docker-compose
docker-compose.yml
dockerfile
container/frontend/Dockerfile
container/worker/Dockerfile
github-actions
.github/workflows/container-publish.yml
  • actions/checkout v4@692973e3d937129bcbf40652eb9f2f61becf3332
  • docker/login-action v3
  • ASzc/change-string-case-action v6
  • docker/build-push-action v6
  • docker/build-push-action v6

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.