From 6c1953a408a9ba42bb4e4502081997980042300b Mon Sep 17 00:00:00 2001 From: Stephen Gadd Date: Tue, 24 Dec 2024 06:55:47 +0000 Subject: [PATCH] TileAPI/Tippecanoe --- .../tippecanoe/requirements.txt => requirements.txt | 0 tileserver/docker/tippecanoe/Dockerfile | 8 +------- tileserver/repository/api/utils/kubernetes.py | 6 +++--- tileserver/values.yaml | 2 +- 4 files changed, 5 insertions(+), 11 deletions(-) rename tileserver/docker/tippecanoe/requirements.txt => requirements.txt (100%) diff --git a/tileserver/docker/tippecanoe/requirements.txt b/requirements.txt similarity index 100% rename from tileserver/docker/tippecanoe/requirements.txt rename to requirements.txt diff --git a/tileserver/docker/tippecanoe/Dockerfile b/tileserver/docker/tippecanoe/Dockerfile index 6df58bf7..bb67c2a7 100644 --- a/tileserver/docker/tippecanoe/Dockerfile +++ b/tileserver/docker/tippecanoe/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:22.04 -LABEL description="Tippecanoe and Tyler Too: incorporates additional dependencies for GIS data processing." +LABEL description="Tippecanoe and Tyler Too: incorporates additional dependencies for debugging." # Install dependencies RUN apt-get update && apt-get install -y \ @@ -15,13 +15,7 @@ RUN apt-get update && apt-get install -y \ wget \ curl \ make \ - postgresql-client # Facilitates communication with the Django Postgres database \ - gdal-bin # Facilitates GIS data processing \ - python3 \ - python3-pip \ - jq \ netcat \ - tee \ && rm -rf /var/lib/apt/lists/* # Clone Tippecanoe and build diff --git a/tileserver/repository/api/utils/kubernetes.py b/tileserver/repository/api/utils/kubernetes.py index b5436eac..72ff7bcc 100644 --- a/tileserver/repository/api/utils/kubernetes.py +++ b/tileserver/repository/api/utils/kubernetes.py @@ -6,7 +6,7 @@ from kubernetes.stream import stream import time import requests -import json +import shlex from typing import Dict, Any TILESERVER_HEALTH_URL = "http://tileserver-gl:8080/health" @@ -100,8 +100,8 @@ def start_tippecanoe_job(tileset_type: str, tileset_id: int, geojson_url: str, n "/tippecanoe/tippecanoe", # Path to the Tippecanoe binary "-o", f"{tileset_type}-{tileset_id}.mbtiles", # Output file name "-f", # Force overwrite output file if it exists - "-n", name, # Name of the tileset - "-A", attribution, # Attribution text + "-n", shlex.quote(name), # Name of the tileset + "-A", shlex.quote(attribution), # Attribution text "-l", "features", # Layer name "-B", "4", # Buffer size (larger values = more detail but larger tiles) "-rg", "10", # Generalization factor (higher = more simplified geometry) diff --git a/tileserver/values.yaml b/tileserver/values.yaml index a1e810d3..81dd5cff 100644 --- a/tileserver/values.yaml +++ b/tileserver/values.yaml @@ -50,7 +50,7 @@ tileserver: tippecanoe: image: "worldhistoricalgazetteer/tippecanoe" - imageTag: "latest" + imageTag: "v0.0.2" imagePullPolicy: "IfNotPresent" pv: