Discussion:
[MapProxy] Issue with use_direct_from_level and WMTS access
d***@bkg.bund.de
2018-07-27 10:21:58 UTC
Permalink
Hello list,

we have an issue when serving a WMTS layer based upon a cache using the option use_direct_from_level. Basically we want to simulate the WMTS over all levels but not cache the whole levels, as the source is fast enough.

It seems that mapproxy ignores the use_direct_from_level setting, when accessing the layer via WMTS. MapProxy tries to cache the excluded levels. We are seeding the cache offline and the server process has only read access to the cache data. So this results in lots of OSErrors when it tries to cache the new data. When accessing the layer via WMS everything works as expected.

Is this a bug or do we miss something? I could see the behavior on MapProxy Version 1.12.0a-20180212.

Here is an example configuration:

services:
wms:
...
wmts:
...

layers:
- name: layer
title: Limited Cache Layer
sources: [cache]

caches:
cache:
grids: [DE_EPSG_25832_ADV]
sources: [source]
meta_size: [1, 1]
meta_buffer: 0
use_direct_from_level: 8
cache:
type: compact
version: 1
directory: /path/to/readonly/cache/DE_EPSG_25832_ADV

sources:
source:
type: mapnik
mapfile: "/path/to/mapnik/config.xml"
layers: ["layer"]
transparent: true

grids:
# Grid für WebAtlasDE UTM32 alle Zoomstufen
DE_EPSG_25832_ADV:
srs: 'EPSG:25832'
tile_size: [256, 256]
res: [4891.96981025128,
2445.98490512564,
1222.99245256282,
611.49622628141,
305.748113140705,
152.874056570353,
76.4370282851763,
38.2185141425881,
19.1092570712941,
9.55462853564703,
4.77731426782352,
2.38865713391176,
1.19432856695588,
0.597164283477939]
bbox: [-46133.17, 5048875.268575673, 1206211.101424327, 6301219.54]
bbox_srs: 'EPSG:25832'
origin: 'ul'
stretch_factor: 1.1

Kind regards,

Dirk Thalheim
Oliver Tonnhofer
2018-08-01 12:02:40 UTC
Permalink
Hello,

use_direct_from_* is only supported for WMS requests. https://mapproxy.org/docs/nightly/configuration.html#use-direct-from-level-and-use-direct-from-res

Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | https://omniscale.com
OpenStreetMap WMS and tile services | https://maps.omniscale.com
Post by d***@bkg.bund.de
Hello list,
we have an issue when serving a WMTS layer based upon a cache using the option use_direct_from_level. Basically we want to simulate the WMTS over all levels but not cache the whole levels, as the source is fast enough.
It seems that mapproxy ignores the use_direct_from_level setting, when accessing the layer via WMTS. MapProxy tries to cache the excluded levels. We are seeding the cache offline and the server process has only read access to the cache data. So this results in lots of OSErrors when it tries to cache the new data. When accessing the layer via WMS everything works as expected.
Is this a bug or do we miss something? I could see the behavior on MapProxy Version 1.12.0a-20180212.
...
...
- name: layer
title: Limited Cache Layer
sources: [cache]
grids: [DE_EPSG_25832_ADV]
sources: [source]
meta_size: [1, 1]
meta_buffer: 0
use_direct_from_level: 8
type: compact
version: 1
directory: /path/to/readonly/cache/DE_EPSG_25832_ADV
type: mapnik
mapfile: "/path/to/mapnik/config.xml"
layers: ["layer"]
transparent: true
# Grid für WebAtlasDE UTM32 alle Zoomstufen
srs: 'EPSG:25832'
tile_size: [256, 256]
res: [4891.96981025128,
2445.98490512564,
1222.99245256282,
611.49622628141,
305.748113140705,
152.874056570353,
76.4370282851763,
38.2185141425881,
19.1092570712941,
9.55462853564703,
4.77731426782352,
2.38865713391176,
1.19432856695588,
0.597164283477939]
bbox: [-46133.17, 5048875.268575673, 1206211.101424327, 6301219.54]
bbox_srs: 'EPSG:25832'
origin: 'ul'
stretch_factor: 1.1
Kind regards,
Dirk Thalheim
_______________________________________________
MapProxy mailing list
https://lists.osgeo.org/mailman/listinfo/mapproxy
Loading...