|
26 | 26 | PUBLIC_HOST = os.environ.get("PUBLIC_HOST", "localhost") |
27 | 27 | DEBUG_LEVEL = os.environ.get("MS_DEBUGLEVEL", "0") |
28 | 28 | GDAL_CACHEMAX = os.environ.get("GDAL_CACHEMAX", "128") |
| 29 | +GDAL_INGESTED_BYTES_AT_OPEN = os.environ.get("GDAL_INGESTED_BYTES_AT_OPEN", "32768") |
| 30 | +CPL_VSIL_CURL_CHUNK_SIZE = os.environ.get("CPL_VSIL_CURL_CHUNK_SIZE", "65536") |
| 31 | +GDAL_DISABLE_READDIR_ON_OPEN = os.environ.get("GDAL_DISABLE_READDIR_ON_OPEN", "EMPTY_DIR") |
29 | 32 | # Per-worker /vsicurl/ byte-range cache. Disabled by default because the |
30 | 33 | # in-container nginx proxy_cache (4 GB on disk, shared across all FastCGI |
31 | 34 | # workers) already serves repeat byte-range reads — a second per-worker |
@@ -128,6 +131,25 @@ def header(extent, srs_set): |
128 | 131 | ' END', |
129 | 132 | '', |
130 | 133 | ' OUTPUTFORMAT', |
| 134 | + ' NAME "webp"', |
| 135 | + ' DRIVER "AGG/WEBP"', |
| 136 | + ' MIMETYPE "image/webp"', |
| 137 | + ' IMAGEMODE RGBA', |
| 138 | + ' TRANSPARENT ON', |
| 139 | + ' EXTENSION "webp"', |
| 140 | + ' FORMATOPTION "QUALITY=80"', |
| 141 | + ' END', |
| 142 | + '', |
| 143 | + ' OUTPUTFORMAT', |
| 144 | + ' NAME "jpeg"', |
| 145 | + ' DRIVER "AGG/JPEG"', |
| 146 | + ' MIMETYPE "image/jpeg"', |
| 147 | + ' IMAGEMODE RGB', |
| 148 | + ' EXTENSION "jpg"', |
| 149 | + ' FORMATOPTION "QUALITY=80"', |
| 150 | + ' END', |
| 151 | + '', |
| 152 | + ' OUTPUTFORMAT', |
131 | 153 | ' NAME "geojson"', |
132 | 154 | ' DRIVER "OGR/GEOJSON"', |
133 | 155 | ' MIMETYPE "application/json; subtype=geojson"', |
@@ -165,7 +187,9 @@ def header(extent, srs_set): |
165 | 187 | f' CONFIG "GDAL_CACHEMAX" "{GDAL_CACHEMAX}"', |
166 | 188 | f' CONFIG "VSI_CACHE" "{VSI_CACHE}"', |
167 | 189 | f' CONFIG "VSI_CACHE_SIZE" "{VSI_CACHE_SIZE}"', |
168 | | - ' CONFIG "GDAL_DISABLE_READDIR_ON_OPEN" "TRUE"', |
| 190 | + f' CONFIG "GDAL_DISABLE_READDIR_ON_OPEN" "{GDAL_DISABLE_READDIR_ON_OPEN}"', |
| 191 | + f' CONFIG "GDAL_INGESTED_BYTES_AT_OPEN" "{GDAL_INGESTED_BYTES_AT_OPEN}"', |
| 192 | + f' CONFIG "CPL_VSIL_CURL_CHUNK_SIZE" "{CPL_VSIL_CURL_CHUNK_SIZE}"', |
169 | 193 | ' CONFIG "GDAL_HTTP_MERGE_CONSECUTIVE_RANGES" "YES"', |
170 | 194 | ' CONFIG "CPL_VSIL_CURL_ALLOWED_EXTENSIONS" ".tif,.tiff,.parquet"', |
171 | 195 | ] |
@@ -297,7 +321,7 @@ def tileindex_layer_for_group(c, db_conn, group): |
297 | 321 | def raster_layer_for_group(c, group): |
298 | 322 | processing = c.get("raster_processing") or [ |
299 | 323 | "BANDS=1,2,3", |
300 | | - "RESAMPLE=AVERAGE", |
| 324 | + "RESAMPLE=BILINEAR", |
301 | 325 | ] |
302 | 326 | processing_lines = [f' PROCESSING "{item}"' for item in processing] |
303 | 327 | layer_name = group.get("layer_name") or c.get("layer_name") or c["id"] |
|
0 commit comments