From 7b67eb52dc98eab936b8000216a0132b4153d642 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 14 Nov 2023 19:43:49 +0200 Subject: [PATCH] re-enable /map/tools/ --- core/utils.py | 5 ++++- core/views/expo.py | 1 + urls.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/utils.py b/core/utils.py index 99acfb3..12f7615 100644 --- a/core/utils.py +++ b/core/utils.py @@ -312,7 +312,7 @@ def find_nearest_point(points, target_point): """Returns the nearest point to a target point from a list of points. TODO FIND OUT - 1. is this SRTM data ? + 1. is this SRTM data ? TICK. Yes. 2. what is the zero altitude datum? Geoid or ellisoid ? Do we need to subtract 47m ?? In our dataset, the survey stations are all within 30m of an srtm reference point. @@ -361,6 +361,9 @@ def find_nearest_point(points, target_point): ; TerrainTool (c) 2008 - 2012 Mike McCombe """ #let raw = [[406264.72, 5278037.57, 873.53], +#first version: +#rawheights = [[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], diff --git a/core/views/expo.py b/core/views/expo.py index 1ff8824..8525b16 100644 --- a/core/views/expo.py +++ b/core/views/expo.py @@ -68,6 +68,7 @@ def map(request): def mapfile(request, path): """Serves unadorned file: everything in the /map/... folder tree""" fn = Path(settings.EXPOWEB, "map", path) + print(f"MAP cuttout. \n{path=}\n{fn=} mime:{getmimetype(fn)}") return HttpResponse(content=open(fn, "r"), content_type=getmimetype(fn)) diff --git a/urls.py b/urls.py index a78167b..6b79ab5 100644 --- a/urls.py +++ b/urls.py @@ -237,7 +237,7 @@ trogglepatterns = [ # This next set are all intercepted by Apache, if it is running, with no problem. re_path(r'^photos/(?P.*)$', mediapage, {'doc_root': settings.PHOTOS_ROOT}, name="mediapage"), # photo galleries re_path(r'^map/slippy/map.html', map, name="map"), # Redirects to OpenStreetMap JavaScript. NOT WORKING - re_path(r'^map/slippy/(?P.*)$', mapfile, name="mapfile"), # css, js, gpx. NOT WORKING + re_path(r'^map/(?P.*)$', mapfile, name="mapfile"), # css, js, gpx. working. This does not add any troggle menus or headers # This next set are all intercepted by Apache, if it is running, AND troggle must manage these, # even though the code is not in the troggle repo