forked from expo/troggle
Make maps an 'unvarnished' url
This commit is contained in:
@@ -344,6 +344,21 @@ def find_nearest_point(points, target_point):
|
||||
nearest_distance = math.sqrt(nearest_distance_squared)
|
||||
return nearest_point_alt, nearest_distance
|
||||
|
||||
# This data was extarcted by Radost:
|
||||
# The original source of heights (and positions is the file)
|
||||
# loser/surface/terrain/SRTM-7x9-M31-482-279-offset.svx
|
||||
"""
|
||||
; Survex terrain data created by TerrainTool version 1.12a from Shuttle Radar Topography Mission data
|
||||
; SRTM DEM data is public-domain.
|
||||
; Used coordinate system AustrianM31 with ellipsoid "Bessel 1841" and datum "MGI Datum (Austria)"
|
||||
; Grid centred at XXX 488000 283750
|
||||
; Lat/Long of centre = 47.691318 13.838777 ( 13 E 50' 19.6" 47 N 41' 28.7") relative to WGS84/GRS80 datum
|
||||
; Grid convergence at centre = -0.374 degrees ( 0 W 22' 27.9")
|
||||
; Point scale factor at centre = 1.0000177
|
||||
; Output offset by adding (-450000.00,-200000.00, 0.00) to calculated results;
|
||||
; TerrainTool (c) 2008 - 2012 Mike McCombe
|
||||
"""
|
||||
#let raw = [[406264.72, 5278037.57, 873.53],
|
||||
rawheights = [[406264.72, 5278037.57, 873.53],
|
||||
[406314.69, 5278036.50, 861.60],
|
||||
[406364.66, 5278035.43, 852.51],
|
||||
|
||||
@@ -60,13 +60,13 @@ def spider(request, _):
|
||||
return redirect("/?#") # so that suffixes applied by spider are no longer part of the url
|
||||
|
||||
def map(request):
|
||||
"""Serves unadorned the expoweb/map/map.html file"""
|
||||
fn = Path(settings.EXPOWEB, "map", "map.html")
|
||||
"""Serves unadorned the expoweb/map/slippy/map.html file"""
|
||||
fn = Path(settings.EXPOWEB, "map", "slippy", "map.html")
|
||||
return HttpResponse(content=open(fn, "r"), content_type="text/html")
|
||||
|
||||
|
||||
def mapfile(request, path):
|
||||
"""Serves unadorned file"""
|
||||
"""Serves unadorned file: everything in the /map/... folder tree"""
|
||||
fn = Path(settings.EXPOWEB, "map", path)
|
||||
return HttpResponse(content=open(fn, "r"), content_type=getmimetype(fn))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user