-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken URLs in airspace list #538
Comments
We are not using openAIP anywhere as far as I know.
yes, we should eventually switch to using that file or a file derived from that. |
Ok, what is the source? because the bitmap layer is more complete than the clickable vector datas. PS: There is also the open flightmaps project (OFM). |
we are essentially rendering it ourselves according to the styling rules in https://github.com/skylines-project/skylines/blob/master/mapserver/airspace/airspace.map
the tiles are cached, but they should be in sync in the majority of cases since the airspace data hasn't been updated in quite a while. |
There are a few things to consider when updating airspaces:
I recommend to test every single new airspace flie on a QA system (e.g. your local SkyLines installation). |
I wrote a quick and dirty tool that upload XCsoar airspace list and output airspace_list on the standard output 😄 This snippet could be included into skylines/commands/import_/airspace.py. Also see XCSoar/xcsoar-data-repository#56 import json
import os.path
import subprocess
from io import StringIO
def download_file(path, url):
# Create data folder if necessary
if not os.path.exists(os.path.dirname(path)):
os.makedirs(os.path.dirname(path))
# Download the current file
# (only if server file is newer than local file)
subprocess.check_call(['wget',
'-q',
'-N',
'--no-check-certificate',
'-U', 'Mozilla/5.0 (Windows NT 5.1; rv:30.0) Gecko/20100101 Firefox/30.0',
'-P', os.path.dirname(path),
'-O', path,
url])
# Check if download succeeded
if not os.path.exists(path):
raise RuntimeError('File not found at {}'.format(path))
# Return path to the file
return path
filename = u'./airspace.json'
download_file(filename, 'https://raw.githubusercontent.com/XCSoar/xcsoar-data-repository/master/data/airspace.json')
f = open(filename, "r")
a = json.load(f)
print '# airspace sources file'
print '#'
print '# each line contains:'
print '# 2-letter-country-code openair/sua url'
print
last_update = str()
recs = sorted(a['records'], key=lambda r: r['area'])
for r in recs:
try:
t = r['type']
except KeyError:
t = 'unknown'
print "%s %s %s" % (r['area'], t, r['uri'])
if r['update'] > last_update:
last_update = r['update']
print '# Updated '+ last_update
|
Using openflightmaps, a more reliable format could avoid this problem. See #559 |
does gdal/ogr have a parser for their data? |
gdal/ogr read partially:
Also, openflightmaps provide EPSG3857 Tiles and Mapbox Tiles (mbtiles).
See #561 |
this was fixed some time in the past weeks |
The Airspace layer seem to come from the openAIP project.
Does we could use the same data source?
xcsoar-data-repository/data/airspace.json
See also #381, #435
The text was updated successfully, but these errors were encountered: