c2cgeoportal-geoportal 2.9rc28__py3-none-any.whl → 2.9rc30__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- c2cgeoportal_geoportal/lib/cacheversion.py +4 -2
- c2cgeoportal_geoportal/scripts/pcreate.py +8 -26
- {c2cgeoportal_geoportal-2.9rc28.dist-info → c2cgeoportal_geoportal-2.9rc30.dist-info}/METADATA +1 -1
- {c2cgeoportal_geoportal-2.9rc28.dist-info → c2cgeoportal_geoportal-2.9rc30.dist-info}/RECORD +7 -7
- {c2cgeoportal_geoportal-2.9rc28.dist-info → c2cgeoportal_geoportal-2.9rc30.dist-info}/WHEEL +0 -0
- {c2cgeoportal_geoportal-2.9rc28.dist-info → c2cgeoportal_geoportal-2.9rc30.dist-info}/entry_points.txt +0 -0
- {c2cgeoportal_geoportal-2.9rc28.dist-info → c2cgeoportal_geoportal-2.9rc30.dist-info}/top_level.txt +0 -0
@@ -66,9 +66,11 @@ class CachebusterTween:
|
|
66
66
|
self.cache_path = registry.settings["cache_path"]
|
67
67
|
|
68
68
|
def __call__(self, request: pyramid.request.Request) -> pyramid.response.Response:
|
69
|
-
path = request.path_info.split("/")
|
69
|
+
path = request.path_info.split("/", 3)
|
70
70
|
if len(path) > 1 and path[1] in self.cache_path:
|
71
|
-
|
71
|
+
if len(path) == 2:
|
72
|
+
raise pyramid.httpexceptions.HTTPNotFound()
|
73
|
+
# Remove the cache buster
|
72
74
|
path.pop(2)
|
73
75
|
request.path_info = "/".join(path)
|
74
76
|
|
@@ -26,7 +26,6 @@
|
|
26
26
|
# either expressed or implied, of the FreeBSD Project.
|
27
27
|
|
28
28
|
|
29
|
-
import json
|
30
29
|
import os
|
31
30
|
import re
|
32
31
|
import subprocess
|
@@ -35,7 +34,7 @@ from argparse import ArgumentParser
|
|
35
34
|
from typing import Any, Union, cast
|
36
35
|
|
37
36
|
import pkg_resources
|
38
|
-
import
|
37
|
+
import pyproj
|
39
38
|
import yaml
|
40
39
|
from cookiecutter.log import configure_logger
|
41
40
|
from cookiecutter.main import cookiecutter
|
@@ -277,31 +276,14 @@ class PCreateCommand:
|
|
277
276
|
@staticmethod
|
278
277
|
def epsg2bbox(srid: int) -> list[str] | None:
|
279
278
|
try:
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
timeout=60,
|
287
|
-
)
|
288
|
-
r1 = r.json()[0]
|
289
|
-
r = requests.get(
|
290
|
-
"https://epsg.io/trans?s_srs=4326&t_srs={srid}&data={bbox[3]},{bbox[2]}".format(
|
291
|
-
srid=srid, bbox=bbox
|
292
|
-
),
|
293
|
-
timeout=60,
|
294
|
-
)
|
295
|
-
r2 = r.json()[0]
|
296
|
-
return [r1["x"], r2["y"], r2["x"], r1["y"]]
|
297
|
-
except requests.RequestException:
|
298
|
-
print("Failed to establish a connection to epsg.io.")
|
299
|
-
except json.JSONDecodeError:
|
300
|
-
print("epsg.io doesn't return a correct json.")
|
301
|
-
except IndexError:
|
302
|
-
print("Unable to get the bbox")
|
279
|
+
crs = pyproj.CRS.from_epsg(srid)
|
280
|
+
assert crs.area_of_use is not None
|
281
|
+
transformer = pyproj.Transformer.from_crs(4326, crs)
|
282
|
+
c1 = transformer.transform(crs.area_of_use.bounds[1], crs.area_of_use.bounds[0])
|
283
|
+
c2 = transformer.transform(crs.area_of_use.bounds[3], crs.area_of_use.bounds[2])
|
284
|
+
return [c1[0], c1[1], c2[0], c2[1]]
|
303
285
|
except Exception as exception: # pylint: disable=broad-exception-caught
|
304
|
-
print(f"
|
286
|
+
print(f"Unexpected error: {str(exception)}")
|
305
287
|
return None
|
306
288
|
|
307
289
|
|
{c2cgeoportal_geoportal-2.9rc28.dist-info → c2cgeoportal_geoportal-2.9rc30.dist-info}/RECORD
RENAMED
@@ -4,7 +4,7 @@ c2cgeoportal_geoportal/resources.py,sha256=n42Gns8DKw32GstDoUdNgud6xdAidaRwgAuNH
|
|
4
4
|
c2cgeoportal_geoportal/lib/__init__.py,sha256=_67fO_aXQZRnxPXcShHBcs38mdYU5ch0FNX89RwMTgA,10431
|
5
5
|
c2cgeoportal_geoportal/lib/authentication.py,sha256=Bfws50nNiboVa2qm3Hdy_-38tygnlB8sX5AW9Zfikw0,9833
|
6
6
|
c2cgeoportal_geoportal/lib/bashcolor.py,sha256=LQgOgtFUvgJ4Ed3-YW3RPjvhBMZBbXBBkUZKE4unRCI,1889
|
7
|
-
c2cgeoportal_geoportal/lib/cacheversion.py,sha256=
|
7
|
+
c2cgeoportal_geoportal/lib/cacheversion.py,sha256=jc8jIKH_yE1NReC2kvUkTkpGERHObdWjPp6kGCWAU1o,3040
|
8
8
|
c2cgeoportal_geoportal/lib/caching.py,sha256=BZzIjgEUfv7puP8XvWY6PAni7HybcLMZrGam3D3mCyA,7124
|
9
9
|
c2cgeoportal_geoportal/lib/check_collector.py,sha256=98N43jvjzCOh19Agipf8varCD9S9I9V8XYQcrSujv0k,3396
|
10
10
|
c2cgeoportal_geoportal/lib/checker.py,sha256=QLe0SUzfSwKYQFpGgFecWkJJlVjA1O2phwf-FvQQOUc,12547
|
@@ -144,7 +144,7 @@ c2cgeoportal_geoportal/scripts/__init__.py,sha256=hHwjhQaM_T2EaupeFIyjl0N67Bcl3M
|
|
144
144
|
c2cgeoportal_geoportal/scripts/c2cupgrade.py,sha256=7smnq2yxs1hAF1CiyE9WfgAqNKjjtrtHevY321i-wio,36826
|
145
145
|
c2cgeoportal_geoportal/scripts/create_demo_theme.py,sha256=-SL-fvAPjgiJZEKYcbhXsZm713txhtWQB18X231k6xQ,3263
|
146
146
|
c2cgeoportal_geoportal/scripts/manage_users.py,sha256=Ih3X_V_xUw59Ums4a1x6qQQtz9VtE7PaxAj-tiZIOPg,5586
|
147
|
-
c2cgeoportal_geoportal/scripts/pcreate.py,sha256=
|
147
|
+
c2cgeoportal_geoportal/scripts/pcreate.py,sha256=AcBIGBQJCvr5fch6HbseKuOCBEpuwr_3w6uokuREZJM,10984
|
148
148
|
c2cgeoportal_geoportal/scripts/theme2fts.py,sha256=Tx1jUfDUwNtwZ5TCyfpldZIbIkzZiQ3dq-kv_YQ9yFE,13737
|
149
149
|
c2cgeoportal_geoportal/scripts/urllogin.py,sha256=qGOOvx2ZN3qnENGzo8NScRqfFC06l1yc48vU6Qx3MBo,3319
|
150
150
|
c2cgeoportal_geoportal/templates/login.html,sha256=Jy8CUw2KrSviePknsvWJLDqCUXam-vPhnMUv7UcD4Pc,2475
|
@@ -185,8 +185,8 @@ tests/test_mapserverproxy_route_predicate.py,sha256=SzILSSzIuilzIkUYVPZiVzLwW1du
|
|
185
185
|
tests/test_raster.py,sha256=82NJ2MXgZlMqs0ytN-VgNw376iURdk4PkAg__dyh5ns,11948
|
186
186
|
tests/test_wmstparsing.py,sha256=xjA8nJuXFl3H5Bfs4sJw_8qX8E8qvAALK7Hs2-DTP2A,9054
|
187
187
|
tests/xmlstr.py,sha256=rkTKSU4FGjupBKLx75H8o-goB0KbQrxDvdpc6xVX_uQ,5985
|
188
|
-
c2cgeoportal_geoportal-2.
|
189
|
-
c2cgeoportal_geoportal-2.
|
190
|
-
c2cgeoportal_geoportal-2.
|
191
|
-
c2cgeoportal_geoportal-2.
|
192
|
-
c2cgeoportal_geoportal-2.
|
188
|
+
c2cgeoportal_geoportal-2.9rc30.dist-info/METADATA,sha256=KoadPR3OC7_t1NyggMrZqRHPlpfldpIMCvYRxYOGuRk,1886
|
189
|
+
c2cgeoportal_geoportal-2.9rc30.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
190
|
+
c2cgeoportal_geoportal-2.9rc30.dist-info/entry_points.txt,sha256=3dnX260FsLX_AubeNMdyeta_z1X4CxcD3steAlfPx2I,1414
|
191
|
+
c2cgeoportal_geoportal-2.9rc30.dist-info/top_level.txt,sha256=PJIbY7Nx51dDrJ052f5mDA7c6Tehm5aD-Gb32L_CtJA,29
|
192
|
+
c2cgeoportal_geoportal-2.9rc30.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{c2cgeoportal_geoportal-2.9rc28.dist-info → c2cgeoportal_geoportal-2.9rc30.dist-info}/top_level.txt
RENAMED
File without changes
|