From c37ce3727cf35c2e281bd4b6e5a5a6360161d7ab Mon Sep 17 00:00:00 2001 From: tebben Date: Tue, 16 Jan 2024 17:18:18 +0100 Subject: [PATCH] fix default location to test cog for docker --- README.md | 8 ++++---- ctod/handlers/base.py | 4 ++-- ctod/templates/static/controls.js | 2 +- ctod/templates/static/index.js | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e691630..d2dfa6a 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ python app.py ./cache Example running docker with a mounted volume and caching enabled ```sh -docker run -p 5000:5000 -v ./ctod_cache:/cache -e CTOD_TILE_CACHING_PATH=/cache ctod +docker run -p 5000:5000 -v ./ctod_cache:/cache -e CTOD_TILE_CACHING_PATH=/cache ghcr.io/sogelink-research/ctod:latest ``` ## Example adding TerrainProvider to Cesium @@ -141,7 +141,7 @@ Returns a sample Cesium viewer #### Example ```sh -http://localhost:5000?minZoom=1&maxZoom=20&cog=ctod/files/test_cog.tif +http://localhost:5000?minZoom=1&maxZoom=20&cog=./ctod/files/test_cog.tif ``` ### Endpoint: `/tiles/layer.json` @@ -161,7 +161,7 @@ Dynamically generates a layer.json based on the COG. #### Example ```sh -http://localhost:5000/tiles/layer.json?minZoom=14&maxZoom=20&cog=ctod/files/test_cog.tif +http://localhost:5000/tiles/layer.json?minZoom=14&maxZoom=20&cog=./ctod/files/test_cog.tif ``` ### Endpoint: `/tiles/{z}/{x}/{y}.terrain` @@ -184,5 +184,5 @@ Get a quantized mesh for tile index z, x, y. Set the minZoom value to retrieve e #### Example ```sh -http://localhost:5000/tiles/17/134972/21614.terrain?minZoom=1&maxZoom=20&cog=ctod/files/test_cog.tif +http://localhost:5000/tiles/17/134972/21614.terrain?minZoom=1&maxZoom=20&cog=./ctod/files/test_cog.tif ``` diff --git a/ctod/handlers/base.py b/ctod/handlers/base.py index 052d8a1..888b972 100644 --- a/ctod/handlers/base.py +++ b/ctod/handlers/base.py @@ -48,10 +48,10 @@ def get_cog(self) -> str: """Get the COG path from the request Returns: - str: The COG path. Defaults to ctod/files/test_cog.tif + str: The COG path. Defaults to ./ctod/files/test_cog.tif """ - return self.get_argument("cog", default="ctod/files/test_cog.tif") + return self.get_argument("cog", default="./ctod/files/test_cog.tif") def get_meshing_method(self) -> str: """Get the method used for meshing diff --git a/ctod/templates/static/controls.js b/ctod/templates/static/controls.js index 69dc9ab..4b73daf 100644 --- a/ctod/templates/static/controls.js +++ b/ctod/templates/static/controls.js @@ -3,7 +3,7 @@ var module, pane, terrainFolder, layerFolder, materialFolder, urlParams; var minZoomValue = 1; var maxZoomValue = 21; var cogValue = - "ctod/files/test_cog.tif"; + "./ctod/files/test_cog.tif"; var resamplingValue = "bilinear"; document.addEventListener("DOMContentLoaded", async () => { diff --git a/ctod/templates/static/index.js b/ctod/templates/static/index.js index 75c81ad..0c34f8b 100644 --- a/ctod/templates/static/index.js +++ b/ctod/templates/static/index.js @@ -50,7 +50,7 @@ function initializeLayers() { const maxZoom = urlParams.get("maxZoom") || 21; const cog = urlParams.get("cog") || - "ctod/files/test_cog.tif"; + "./ctod/files/test_cog.tif"; setTerrainProvider(minZoom, maxZoom, cog, "bilinear"); streetsLayer.show = true;