[Git][debian-gis-team/mapproxy][master] 4 commits: New upstream version 3.1.3+dfsg

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Tue Nov 26 14:25:34 GMT 2024



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


Commits:
b5edcd4c by Bas Couwenberg at 2024-11-26T15:16:33+01:00
New upstream version 3.1.3+dfsg
- - - - -
6d198e09 by Bas Couwenberg at 2024-11-26T15:16:36+01:00
Update upstream source from tag 'upstream/3.1.3+dfsg'

Update to upstream version '3.1.3+dfsg'
with Debian dir 27abe04559881cdafcf501d38ef83a684ec52193
- - - - -
799e258d by Bas Couwenberg at 2024-11-26T15:16:49+01:00
New upstream release.

- - - - -
ac066b8f by Bas Couwenberg at 2024-11-26T15:18:18+01:00
Set distribution to unstable.

- - - - -


11 changed files:

- .github/workflows/dockerbuild.yml
- CHANGES.txt
- debian/changelog
- doc/configuration.rst
- mapproxy/cache/compact.py
- mapproxy/cache/legend.py
- mapproxy/image/mask.py
- mapproxy/util/ext/lockfile.py
- mapproxy/util/fs.py
- requirements-tests.txt
- setup.py


Changes:

=====================================
.github/workflows/dockerbuild.yml
=====================================
@@ -128,7 +128,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: Run trivy
-        uses: aquasecurity/trivy-action at 0.28.0
+        uses: aquasecurity/trivy-action at 0.29.0
         with:
           format: 'sarif'
           ignore-unfixed: true


=====================================
CHANGES.txt
=====================================
@@ -1,3 +1,17 @@
+3.1.3 2024-11-26
+~~~~~~~~~~~~~~~~
+
+Maintenance:
+
+  - Several dependencies for the tests and GitHub actions have been updated
+  - Spelling and grammar mistakes in the documentation corrected
+
+Fixes:
+
+  - The chmod to update file permissions is now only called if the file was freshly created
+  - A bug with clipping polygons that become multi polygons due to the clipping is now fixed
+
+
 3.1.2 2024-11-20
 ~~~~~~~~~~~~~~~~
 


=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+mapproxy (3.1.3+dfsg-1) unstable; urgency=medium
+
+  * New upstream release.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Tue, 26 Nov 2024 15:18:07 +0100
+
 mapproxy (3.1.2+dfsg-1) unstable; urgency=medium
 
   * New upstream release.


=====================================
doc/configuration.rst
=====================================
@@ -238,7 +238,7 @@ The name of the layer. You can omit the name for group layers (e.g. layers with
 
 ``title``
 """""""""
-Readable name of the layer, e.g WMS layer title.
+Readable name of the layer, e.g. WMS layer title.
 
 
 .. _layers:
@@ -297,14 +297,14 @@ A list of caches for this layer. This list overrides ``sources`` for WMTS and TM
 
 Limit the layer to the given min and max resolution or scale. MapProxy will return a blank image for requests outside of these boundaries (``min_res`` is inclusive, ``max_res`` exclusive). You can use either the resolution or the scale values, missing values will be interpreted as `unlimited`. Resolutions should be in meters per pixel.
 
-The values will also apear in the capabilities documents (i.e. WMS ScaleHint and Min/MaxScaleDenominator).
+The values will also appear in the capabilities documents (i.e. WMS ScaleHint and Min/MaxScaleDenominator).
 
 Please read :ref:`scale vs. resolution <scale_resolution>` for some notes on `scale`.
 
 ``legendurl``
 """""""""""""
 
-Configure a URL to an image that should be returned as the legend for this layer. Local URLs (``file://``) are also supported. MapProxy ignores the legends from the sources of this layer if you configure a ``legendurl`` here. If WMS and WMTS are enabled the address to the WMS `GetLegendGraphic` endpoint will be included in the WMTS capabilities as the legend url.
+Configure a URL to an image that should be returned as the legend for this layer. Local URLs (``file://``) are also supported. MapProxy ignores the legends from the sources of this layer if you configure a ``legendurl`` here. If WMS and WMTS are enabled the address to the WMS `GetLegendGraphic` endpoint will be included in the WMTS capabilities as the legend URL.
 
 .. _layer_metadata:
 
@@ -397,7 +397,7 @@ Each dimension is another dictionary with a list of ``values`` and an optional `
 
 It is possible to configure which URLS the WMTS will advertise as LegendURLs through its capabilities. These will be
 inserted as a ``LegendURL`` tag into the capabilities document. These URLs support two template variables ``{base_url}``
-which is the base url of MapProxy and ``{layer_name}`` which is the name of the layer.
+which is the base URL of MapProxy and ``{layer_name}`` which is the name of the layer.
 
 .. code-block:: yaml
 
@@ -541,7 +541,7 @@ In practice this means that all the linked images will have the first such tile'
 """"""""""""""""""""""""""
 If set to ``true``, MapProxy will only issue a single request to the source. This option can reduce the request latency for uncached areas (on demand caching).
 
-By default MapProxy requests all uncached meta-tiles that intersect the requested bbox. With a typical configuration it is not uncommon that a requests will trigger four requests each larger than 2000x2000 pixel. With the ``minimize_meta_requests`` option enabled, each request will trigger only one request to the source. That request will be aligned to the next tile boundaries and the tiles will be cached.
+By default MapProxy requests all uncached meta-tiles that intersect the requested bbox. With a typical configuration it is not uncommon that a request will trigger four requests each larger than 2000x2000 pixel. With the ``minimize_meta_requests`` option enabled, each request will trigger only one request to the source. That request will be aligned to the next tile boundaries and the tiles will be cached.
 
 .. index:: watermark
 
@@ -616,9 +616,9 @@ MapProxy is able to create missing tiles by rescaling tiles from zoom levels bel
 
 MapProxy will scale up tiles from one or more zoom levels above (with lower resolutions) if you set ``upscale_tiles`` to 1 or higher. The value configures by how many zoom levels MapProxy can search for a proper tile. Higher values allow more blurry results.
 
-You can use ``upscale_tiles`` if you want to provide tiles or WMS responses in a higher resolution then your available cache. This also works with partially seeded caches, eg. where you have an aerial image cache of 20cm, with some areas also in 10cm resolution. ``upscale_tiles`` allows you to provide responses for 10cm requests in all areas, always returning the best available data.
+You can use ``upscale_tiles`` if you want to provide tiles or WMS responses in a higher resolution then your available cache. This also works with partially seeded caches, e.g. where you have an aerial image cache of 20cm, with some areas also in 10cm resolution. ``upscale_tiles`` allows you to provide responses for 10cm requests in all areas, always returning the best available data.
 
-MapProxy will scale down tiles from one or more zoom levels below (with higher resolutions) if you set ``downscale_tiles`` to 1 or higher. The value configures by how many zoom levels MapProxy can search for a proper tile. Note that the number of tiles growth exponentialy. Typically, a single tile can be downscaled from four tiles of the next zoom level. Downscaling from two levels below requires 16 tiles, three levels below requires 64, etc.. A larger WMS request can quickly accumulate thousands of tiles required for downscaling. It is therefore `not` recommended to use ``downscale_tiles`` values larger then one.
+MapProxy will scale down tiles from one or more zoom levels below (with higher resolutions) if you set ``downscale_tiles`` to 1 or higher. The value configures by how many zoom levels MapProxy can search for a proper tile. Note that the number of tiles growth exponentially. Typically, a single tile can be downscaled from four tiles of the next zoom level. Downscaling from two levels below requires 16 tiles, three levels below requires 64, etc.. A larger WMS request can quickly accumulate thousands of tiles required for downscaling. It is therefore `not` recommended to use ``downscale_tiles`` values larger than one.
 
 You can use ``downscale_tiles`` to fill a cache for a source that only provides data for higher resolutions.
 
@@ -677,7 +677,7 @@ Example:
 """"""""""""""""""""
 
 If set to ``true``, MapProxy will not store any tiles for this cache. MapProxy will re-request all required tiles for each incoming request,
-even if the there are matching tiles in the cache. See :ref:`seed_only <wms_seed_only>` if you need an *offline* mode.
+even if there are matching tiles in the cache. See :ref:`seed_only <wms_seed_only>` if you need an *offline* mode.
 
 .. note:: Be careful when using a cache with disabled storage in tile services when the cache uses WMS sources with metatiling.
 
@@ -841,7 +841,7 @@ The total number of cached resolution levels. Defaults to 20, except for grids w
 
 ``min_res`` and ``max_res``
 """""""""""""""""""""""""""
-The the resolutions of the first and the last level.
+The resolutions of the first and the last level.
 
 ``stretch_factor``
 """"""""""""""""""
@@ -849,7 +849,7 @@ MapProxy chooses the `optimal` cached level for requests that do not exactly
 match any cached resolution. MapProxy will stretch or shrink images to the
 requested resolution. The `stretch_factor` defines the maximum factor
 MapProxy is allowed to stretch images. Stretched images result in better
-performance but will look blurry when the value is to large (> 1.2).
+performance but will look blurry when the value is too large (> 1.2).
 
 Example: Your MapProxy caches 10m and 5m resolutions. Requests with 9m
 resolution will be generated from the 10m level, requests for 8m from the 5m
@@ -910,7 +910,7 @@ Example ``grids`` configuration
 sources
 -------
 
-A sources defines where MapProxy can request new data. Each source has a ``type`` and all other options are dependent to this type.
+A source defines where MapProxy can request new data. Each source has a ``type`` and all other options are dependent to this type.
 
 See :doc:`sources` for the documentation of all available sources.
 
@@ -1027,7 +1027,7 @@ The following options define how tiles are created and stored. Most options can
 .. _lock_dir:
 
 ``lock_dir``
-  MapProxy uses locking to limit multiple request to the same service. See ``concurrent_requests``.
+  MapProxy uses locking to limit multiple requests to the same service. See ``concurrent_requests``.
   This option defines where the temporary lock files will be stored. The path
   can either be absolute (e.g. ``/tmp/lock/mapproxy``) or relative to the
   mapproxy.yaml file. Defaults to ``./cache_data/tile_locks``.
@@ -1103,7 +1103,7 @@ The following options define how tiles are created and stored. Most options can
 
 ``axis_order_ne`` and ``axis_order_en``
   The axis ordering defines in which order coordinates are given, i.e. lon/lat or lat/lon.
-  The ordering is dependent to the SRS. Most clients and servers did not respected the
+  The ordering is dependent to the SRS. Most clients and servers did not respect the
   ordering and everyone used lon/lat ordering. With the WMS 1.3.0 specification the OGC
   emphasized that the axis ordering of the SRS should be used.
 
@@ -1212,7 +1212,7 @@ Sets the ``Access-control-allow-origin`` header to HTTP responses for `Cross-ori
 .. versionadded:: 1.14.0
 
 Enables MapProxy cookie management for HTTP sources. When enabled MapProxy will accept and store server cookies. Accepted cookies will be passed
-back to the source on subsequent requests. Usefull for sources which require to maintain an HTTP session to work efficiently, maybe in combination
+back to the source on subsequent requests. Useful for sources which require to maintain an HTTP session to work efficiently, maybe in combination
 with basic authentication. Depending on your deployment MapProxy will still start multiple sessions (e.g. one per MapProxy process).
 Cookie handling is based on Python `CookieJar <https://docs.python.org/3/library/http.cookiejar.html>`_. Disabled by default.
 
@@ -1386,7 +1386,7 @@ Notes
 Scale vs. resolution
 """"""""""""""""""""
 
-Scale is the ratio of a distance on a map and the corresponding distance on the ground. This implies that the map distance and the ground distance are measured in the same unit. For MapProxy a `map` is just a collection of pixels and the pixels do not have any size/dimension. They do correspond to a ground size but the size on the `map` is depended of the physical output format. MapProxy can thus only work with resolutions (pixel per ground unit) and not scales.
+Scale is the ratio of a distance on a map and the corresponding distance on the ground. This implies that the map distance and the ground distance are measured in the same unit. For MapProxy a `map` is just a collection of pixels and the pixels do not have any size/dimension. They do correspond to a ground size but the size on the `map` is depended on the physical output format. MapProxy can thus only work with resolutions (pixel per ground unit) and not scales.
 
 This applies to all servers and the OGC WMS standard as well. Some neglect this fact and assume a fixed pixel dimension (like 72dpi), the OCG WMS 1.3.0 standard uses a pixel size of 0.28 mm/px (around 91dpi). But you need to understand that a `scale` will differ if you print a map (200, 300 or more dpi) or if you show it on a computer display (typical 90-120 dpi, but there are mobile devices with more than 300 dpi).
 


=====================================
mapproxy/cache/compact.py
=====================================
@@ -347,8 +347,9 @@ class BundleIndexV1(object):
     @contextlib.contextmanager
     def readwrite(self):
         self._init_index()
+        set_permissions = self.file_permissions and not os.path.exists(self.filename)
         with open(self.filename, 'r+b') as fh:
-            if self.file_permissions:
+            if set_permissions:
                 permission = int(self.file_permissions, base=8)
                 log.info("setting file permissions on compact cache file: " + self.file_permissions)
                 os.chmod(self.filename, permission)


=====================================
mapproxy/cache/legend.py
=====================================
@@ -65,9 +65,10 @@ class LegendCache(object):
 
         data = legend.source.as_buffer(ImageOptions(format='image/' + self.file_ext), seekable=True)
         data.seek(0)
+        set_permissions = self.file_permissions and not os.path.exists(legend.location)
         log.debug('writing to %s' % (legend.location))
         write_atomic(legend.location, data.read())
-        if self.file_permissions:
+        if set_permissions:
             permission = int(self.file_permissions, base=8)
             log.info("setting file permissions on compact cache file: " + self.file_permissions)
             os.chmod(legend.location, permission)


=====================================
mapproxy/image/mask.py
=====================================
@@ -71,7 +71,7 @@ def image_mask_from_geom(size, bbox, polygons):
 
         if buffered.geom_type == 'MultiPolygon':
             # negative buffer can turn polygon into multipolygon
-            for p in buffered:
+            for p in buffered.geoms:
                 draw_polygon(p)
         else:
             draw_polygon(buffered)


=====================================
mapproxy/util/ext/lockfile.py
=====================================
@@ -117,14 +117,16 @@ class LockFile:
 
     def __init__(self, path, file_permissions):
         self._path = path
+        set_permissions = file_permissions and not os.path.exists(path)
         try:
             fp = open(path, 'w+')
-            if file_permissions:
-                permission = int(file_permissions, base=8)
-                os.chmod(path, permission)
         except IOError:
             raise Exception('Could not create Lock-file, wrong permissions on lock directory?')
 
+        if set_permissions:
+            permission = int(file_permissions, base=8)
+            os.chmod(path, permission)
+
         try:
             _lock_file(fp)
         except Exception as ex:


=====================================
mapproxy/util/fs.py
=====================================
@@ -119,7 +119,6 @@ def ensure_directory(file_name, directory_permissions=None):
             # call ensure_directory recursively
             ensure_directory(dir_name, directory_permissions)
 
-            # print("create dir" + dir + "with permission" + directory_permissions)
             os.mkdir(dir_name)
             if directory_permissions:
                 permission = int(directory_permissions, base=8)


=====================================
requirements-tests.txt
=====================================
@@ -9,7 +9,7 @@ attrs==19.3.0;python_version<"3.10"
 attrs==23.2.0;python_version>="3.10"
 aws-sam-translator==1.91.0
 aws-xray-sdk==2.12.1
-beautifulsoup4==4.12.2
+beautifulsoup4==4.12.3
 boto3==1.35.6
 boto==2.49.0
 botocore==1.35.6
@@ -19,7 +19,7 @@ cfn-lint==0.80.3
 chardet==5.2.0
 cryptography==43.0.1
 decorator==5.1.1
-docker==7.0.0
+docker==7.1.0
 docutils==0.20.1;python_version<"3.9"
 docutils==0.21.2;python_version>="3.9"
 ecdsa==0.18.0
@@ -66,9 +66,9 @@ six==1.16.0
 soupsieve==2.6
 sshpubkeys==3.3.1
 toml==0.10.2
-urllib3==1.26.19
+urllib3==1.26.20
 waitress==2.1.2;python_version<"3.10"
-waitress==3.0.1;python_version>="3.10"
+waitress==3.0.2;python_version>="3.10"
 websocket-client==1.8.0
 wrapt==1.16.0
 xmltodict==0.13.0


=====================================
setup.py
=====================================
@@ -63,7 +63,7 @@ def long_description(changelog_releases=10):
 
 setup(
     name='MapProxy',
-    version="3.1.2",
+    version="3.1.3",
     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/-/compare/09c19521cec817f14447e308758c36e829bfb8b4...ac066b8f09f87539680a9e075fc323c743d630e2

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapproxy/-/compare/09c19521cec817f14447e308758c36e829bfb8b4...ac066b8f09f87539680a9e075fc323c743d630e2
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/20241126/9a44e356/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list