[Git][debian-gis-team/mapproxy][upstream] New upstream version 4.0.1+dfsg

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Tue Mar 25 15:03:36 GMT 2025



Bas Couwenberg pushed to branch upstream at Debian GIS Project / mapproxy


Commits:
f701d72c by Bas Couwenberg at 2025-03-25T15:55:59+01:00
New upstream version 4.0.1+dfsg
- - - - -


9 changed files:

- CHANGES.txt
- doc/index.rst
- doc/install_docker.rst
- + doc/ogc_api.rst
- mapproxy/config/loader.py
- mapproxy/service/demo.py
- mapproxy/service/templates/demo/wmts_demo.html
- mapproxy/service/wmts.py
- setup.py


Changes:

=====================================
CHANGES.txt
=====================================
@@ -1,3 +1,15 @@
+4.0.1 2025-03-25
+~~~~~~~~~~~~~~~~
+
+Improvements:
+
+  - Added docs regarding OGC API support
+
+Fixes:
+
+  - WMTS Demo now works if kvp is disabled
+
+
 4.0.0 2025-03-21
 ~~~~~~~~~~~~~~~~
 


=====================================
doc/index.rst
=====================================
@@ -27,6 +27,7 @@ MapProxy Documentation
    mapproxy_util_autoconfig
    deployment
    configuration_examples
+   ogc_api
    inspire
    labeling
    auth


=====================================
doc/install_docker.rst
=====================================
@@ -25,15 +25,13 @@ base images for implementing custom setups. As they have no WebServer running th
 The images ending with ``-dev``, start the integrated webserver mapproxy provides through
 ``mapproxy-util serve-develop``. These should not be used in a production environment!
 
-The images ending with ``-nginx``, come bundled with a preconfigured `nginx`_ HTTP Server, that lets you use MapProxy
-instantly in a production environment.
+The images ending with ``-nginx``, come bundled with a preconfigured `nginx <https://nginx.org/>`_ HTTP Server, that
+lets you use MapProxy instantly in a production environment.
 
 See the quickstart section below for a configuration / example on how to use those images.
 
-There are also several unofficial Docker images available on `Docker Hub`_ that provide ready-to-use containers for
-MapProxy.
-
-.. _`Docker Hub`: https://hub.docker.com/search?q=mapproxy
+There are also several unofficial Docker images available on `Docker Hub <https://hub.docker.com/search?q=mapproxy>`_
+that provide ready-to-use containers forMapProxy.
 
 The community has very good experiences with the following ones:
 
@@ -50,7 +48,7 @@ Quickstart
 ----------
 
 The mapproxy repository includes an `example docker compose file <https://github.com/mapproxy/mapproxy/blob/master/docker-compose.yaml>`_
- that you can use to run one of the images or as a reference for the most commonly used options.
+that you can use to run one of the images or as a reference for the most commonly used options.
 
 Create a directory (e.g. `mapproxyconfig`) for your configuration files. Put your configs into that folder.
 If you do not supply a mapproxy config file the image will create a default seed.yaml and mapproxy.yaml for you.
@@ -80,17 +78,16 @@ Volume-Mounts
 - ``/mapproxy/config/mapproxy.yaml``: MapProxy Config
 - ``/mapproxy/config/logging.ini``: Logging-Configuration
 - ``/mapproxy/config/cache_data``: Cache Data dir. Make sure that this directory is writable for the mapproxy image.
-    This can be achieved with `chmod -R a+r cache_data`
+This can be achieved with `chmod -R a+r cache_data`
 
 
 Environment Variables
 ~~~~~~~~~~~~~~~~~~~~~
 
 - ``MULTIAPP_MAPPROXY``: **This can only be used in nginx images.** If set to ``true``, MapProxy will start in multi app
-    mode and will run all configurations in the ``/mapproxy/config/apps`` directory as different apps. Default
-    is ``false``.
+mode and will run all configurations in the ``/mapproxy/config/apps`` directory as different apps. Default is ``false``.
 - ``MULTIAPP_ALLOW_LISTINGS``: In multi app mode if set to ``true``, MapProxy lists all available apps on the root page.
-    Default is ``false``.
+Default is ``false``.
 
 
 Build your own image


=====================================
doc/ogc_api.rst
=====================================
@@ -0,0 +1,12 @@
+OGC API Support
+===============
+
+MapProxy does not support the OGC APIs natively. There are ways to combine MapProxy with pygeoapi via docker to be able
+to use MapProxy through the OGC API of pygeoapi. An example project exists here:
+https://github.com/mapproxy/mapproxy-pygeoapi-example.
+
+Call for sponsors
+-----------------
+
+This feature is important to make MapProxy future-proof and it is desirable to integrate OGC APIs directly into
+MapProxy. If you are interested in sponsoring this feature please contact sales at terrestris.de.


=====================================
mapproxy/config/loader.py
=====================================
@@ -2349,12 +2349,9 @@ class ServiceConfiguration(ConfigurationBase):
             kvp = wmts_conf.get('kvp')
             restful = wmts_conf.get('restful')
 
-            if kvp is None and restful is None:
-                kvp = restful = True
-
-            if kvp:
+            if kvp or kvp is None:
                 services.append('wmts_kvp')
-            if restful:
+            if restful or restful is None:
                 services.append('wmts_restful')
 
         if 'wms' in self.context.services.conf:


=====================================
mapproxy/service/demo.py
=====================================
@@ -317,6 +317,8 @@ class DemoServer(Server):
                 wmts_layer = layer
                 break
 
+        rest_enabled = 'wmts_restful' in self.services
+
         restful_url = self.restful_template.replace('{Layer}', wmts_layer.name, 1)
         if '{Format}' in restful_url:
             restful_url = restful_url.replace('{Format}', wmts_layer.format)
@@ -335,6 +337,7 @@ class DemoServer(Server):
                                    resolutions=wmts_layer.grid.resolutions,
                                    units=units,
                                    all_tile_layers=self.tile_layers,
+                                   rest_enabled=rest_enabled,
                                    restful_url=restful_url,
                                    background_url=background_url)
 


=====================================
mapproxy/service/templates/demo/wmts_demo.html
=====================================
@@ -46,13 +46,14 @@ jscript_functions=None
         const projection = ol.proj.get(srs);
 
         const source = new ol.source.WMTS({
-            url: '../service?',
+            url: {{if rest_enabled}}'../wmts{{restful_url}}'{{else}}'../service?'{{endif}},
             layer: "{{layer.name}}",
             matrixSet: '{{matrix_set}}',
             format: "{{format}}",
             projection: "{{srs}}",
             transparent: transparent,
             style: '',
+            {{if rest_enabled}}requestEncoding: 'REST',{{endif}}
             tileGrid: new ol.tilegrid.WMTS({
                 origin: ol.extent.getTopLeft(grid_extent),
                 resolutions: resolutions,


=====================================
mapproxy/service/wmts.py
=====================================
@@ -184,7 +184,7 @@ class WMTSServer(Server):
             if result['authorized'] == 'unauthenticated':
                 raise RequestError('unauthorized', status=401)
             if result['authorized'] == 'full':
-                return self.layers.values()
+                return list(self.layers.values())
             if result['authorized'] == 'none':
                 raise RequestError('forbidden', status=403)
             allowed_layers = []
@@ -193,7 +193,7 @@ class WMTSServer(Server):
                     allowed_layers.append(layer)
             return allowed_layers
         else:
-            return self.layers.values()
+            return list(self.layers.values())
 
     def check_request(self, request, info_formats=None):
         request.make_request()


=====================================
setup.py
=====================================
@@ -62,7 +62,7 @@ def long_description(changelog_releases=10):
 
 setup(
     name='MapProxy',
-    version="4.0.0",
+    version="4.0.1",
     description='An accelerating proxy for tile and web map services',
     long_description=long_description(7),
     long_description_content_type='text/x-rst',



View it on GitLab: https://salsa.debian.org/debian-gis-team/mapproxy/-/commit/f701d72cf140056bc38fb6e81f8a7641f56d76cf

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapproxy/-/commit/f701d72cf140056bc38fb6e81f8a7641f56d76cf
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20250325/16950631/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list