geoservercloud 0.2.2__tar.gz → 0.2.3.dev4__tar.gz
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.
- {geoservercloud-0.2.2 → geoservercloud-0.2.3.dev4}/PKG-INFO +1 -1
- {geoservercloud-0.2.2 → geoservercloud-0.2.3.dev4}/geoservercloud/geoservercloud.py +10 -0
- geoservercloud-0.2.3.dev4/geoservercloud/gridsets/2056.xml +83 -0
- geoservercloud-0.2.3.dev4/geoservercloud/gridsets/21781.xml +83 -0
- {geoservercloud-0.2.2 → geoservercloud-0.2.3.dev4}/pyproject.toml +2 -4
- {geoservercloud-0.2.2 → geoservercloud-0.2.3.dev4}/LICENSE +0 -0
- {geoservercloud-0.2.2 → geoservercloud-0.2.3.dev4}/README.md +0 -0
- {geoservercloud-0.2.2 → geoservercloud-0.2.3.dev4}/geoservercloud/__init__.py +0 -0
- {geoservercloud-0.2.2 → geoservercloud-0.2.3.dev4}/geoservercloud/gridsets/3857.xml +0 -0
- {geoservercloud-0.2.2 → geoservercloud-0.2.3.dev4}/geoservercloud/restservice.py +0 -0
- {geoservercloud-0.2.2 → geoservercloud-0.2.3.dev4}/geoservercloud/templates.py +0 -0
- {geoservercloud-0.2.2 → geoservercloud-0.2.3.dev4}/geoservercloud/utils.py +0 -0
|
@@ -329,6 +329,13 @@ class GeoServerCloud:
|
|
|
329
329
|
|
|
330
330
|
return self.post_request(path, json=payload)
|
|
331
331
|
|
|
332
|
+
def get_gwc_layer(self, workspace: str, layer: str) -> dict[str, Any] | None:
|
|
333
|
+
path = f"/gwc/rest/layers/{workspace}:{layer}.json"
|
|
334
|
+
response = self.get_request(path)
|
|
335
|
+
if response.status_code == 404:
|
|
336
|
+
return None
|
|
337
|
+
return response.json()
|
|
338
|
+
|
|
332
339
|
def publish_gwc_layer(
|
|
333
340
|
self, workspace: str, layer: str, epsg: int = 4326
|
|
334
341
|
) -> Response | None:
|
|
@@ -338,6 +345,9 @@ class GeoServerCloud:
|
|
|
338
345
|
headers={"Content-Type": "application/json"},
|
|
339
346
|
data="reload_configuration=1", # type: ignore
|
|
340
347
|
)
|
|
348
|
+
# Do not re-publish an existing layer
|
|
349
|
+
if self.get_gwc_layer(workspace, layer):
|
|
350
|
+
return None
|
|
341
351
|
payload = Templates.gwc_layer(workspace, layer, f"EPSG:{epsg}")
|
|
342
352
|
return self.put_request(
|
|
343
353
|
f"/gwc/rest/layers/{workspace}:{layer}.json",
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<gridSet>
|
|
3
|
+
<name>EPSG:2056</name>
|
|
4
|
+
<srs>
|
|
5
|
+
<number>2056</number>
|
|
6
|
+
</srs>
|
|
7
|
+
<extent>
|
|
8
|
+
<coords>
|
|
9
|
+
<double>2420000.0</double>
|
|
10
|
+
<double>326000.0</double>
|
|
11
|
+
<double>3444000.0</double>
|
|
12
|
+
<double>1350000.0</double>
|
|
13
|
+
</coords>
|
|
14
|
+
</extent>
|
|
15
|
+
<resolutions>
|
|
16
|
+
<double>4000.0</double>
|
|
17
|
+
<double>3750.0</double>
|
|
18
|
+
<double>3500.0</double>
|
|
19
|
+
<double>3250.0</double>
|
|
20
|
+
<double>3000.0</double>
|
|
21
|
+
<double>2750.0</double>
|
|
22
|
+
<double>2500.0</double>
|
|
23
|
+
<double>2250.0</double>
|
|
24
|
+
<double>2000.0</double>
|
|
25
|
+
<double>1750.0</double>
|
|
26
|
+
<double>1500.0</double>
|
|
27
|
+
<double>1250.0</double>
|
|
28
|
+
<double>1000.0</double>
|
|
29
|
+
<double>750.0</double>
|
|
30
|
+
<double>650.0</double>
|
|
31
|
+
<double>500.0</double>
|
|
32
|
+
<double>250.0</double>
|
|
33
|
+
<double>100.0</double>
|
|
34
|
+
<double>50.0</double>
|
|
35
|
+
<double>20.0</double>
|
|
36
|
+
<double>10.0</double>
|
|
37
|
+
<double>5.0</double>
|
|
38
|
+
<double>2.5</double>
|
|
39
|
+
<double>2.0</double>
|
|
40
|
+
<double>1.5</double>
|
|
41
|
+
<double>1.0</double>
|
|
42
|
+
<double>0.5</double>
|
|
43
|
+
<double>0.25</double>
|
|
44
|
+
<double>0.1</double>
|
|
45
|
+
</resolutions>
|
|
46
|
+
<scaleNames>
|
|
47
|
+
<string>EPSG:2056:0</string>
|
|
48
|
+
<string>EPSG:2056:1</string>
|
|
49
|
+
<string>EPSG:2056:2</string>
|
|
50
|
+
<string>EPSG:2056:3</string>
|
|
51
|
+
<string>EPSG:2056:4</string>
|
|
52
|
+
<string>EPSG:2056:5</string>
|
|
53
|
+
<string>EPSG:2056:6</string>
|
|
54
|
+
<string>EPSG:2056:7</string>
|
|
55
|
+
<string>EPSG:2056:8</string>
|
|
56
|
+
<string>EPSG:2056:9</string>
|
|
57
|
+
<string>EPSG:2056:10</string>
|
|
58
|
+
<string>EPSG:2056:11</string>
|
|
59
|
+
<string>EPSG:2056:12</string>
|
|
60
|
+
<string>EPSG:2056:13</string>
|
|
61
|
+
<string>EPSG:2056:14</string>
|
|
62
|
+
<string>EPSG:2056:15</string>
|
|
63
|
+
<string>EPSG:2056:16</string>
|
|
64
|
+
<string>EPSG:2056:17</string>
|
|
65
|
+
<string>EPSG:2056:18</string>
|
|
66
|
+
<string>EPSG:2056:19</string>
|
|
67
|
+
<string>EPSG:2056:20</string>
|
|
68
|
+
<string>EPSG:2056:21</string>
|
|
69
|
+
<string>EPSG:2056:22</string>
|
|
70
|
+
<string>EPSG:2056:23</string>
|
|
71
|
+
<string>EPSG:2056:24</string>
|
|
72
|
+
<string>EPSG:2056:25</string>
|
|
73
|
+
<string>EPSG:2056:26</string>
|
|
74
|
+
<string>EPSG:2056:27</string>
|
|
75
|
+
<string>EPSG:2056:28</string>
|
|
76
|
+
</scaleNames>
|
|
77
|
+
<tileHeight>256</tileHeight>
|
|
78
|
+
<tileWidth>256</tileWidth>
|
|
79
|
+
<yCoordinateFirst>false</yCoordinateFirst>
|
|
80
|
+
<alignTopLeft>false</alignTopLeft>
|
|
81
|
+
<metersPerUnit>1.0</metersPerUnit>
|
|
82
|
+
<pixelSize>2.8E-4</pixelSize>
|
|
83
|
+
</gridSet>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<gridSet>
|
|
3
|
+
<name>EPSG:21781</name>
|
|
4
|
+
<srs>
|
|
5
|
+
<number>21781</number>
|
|
6
|
+
</srs>
|
|
7
|
+
<extent>
|
|
8
|
+
<coords>
|
|
9
|
+
<double>420000.0</double>
|
|
10
|
+
<double>-674000.0</double>
|
|
11
|
+
<double>1444000.0</double>
|
|
12
|
+
<double>350000.0</double>
|
|
13
|
+
</coords>
|
|
14
|
+
</extent>
|
|
15
|
+
<resolutions>
|
|
16
|
+
<double>4000.0</double>
|
|
17
|
+
<double>3750.0</double>
|
|
18
|
+
<double>3500.0</double>
|
|
19
|
+
<double>3250.0</double>
|
|
20
|
+
<double>3000.0</double>
|
|
21
|
+
<double>2750.0</double>
|
|
22
|
+
<double>2500.0</double>
|
|
23
|
+
<double>2250.0</double>
|
|
24
|
+
<double>2000.0</double>
|
|
25
|
+
<double>1750.0</double>
|
|
26
|
+
<double>1500.0</double>
|
|
27
|
+
<double>1250.0</double>
|
|
28
|
+
<double>1000.0</double>
|
|
29
|
+
<double>750.0</double>
|
|
30
|
+
<double>650.0</double>
|
|
31
|
+
<double>500.0</double>
|
|
32
|
+
<double>250.0</double>
|
|
33
|
+
<double>100.0</double>
|
|
34
|
+
<double>50.0</double>
|
|
35
|
+
<double>20.0</double>
|
|
36
|
+
<double>10.0</double>
|
|
37
|
+
<double>5.0</double>
|
|
38
|
+
<double>2.5</double>
|
|
39
|
+
<double>2.0</double>
|
|
40
|
+
<double>1.5</double>
|
|
41
|
+
<double>1.0</double>
|
|
42
|
+
<double>0.5</double>
|
|
43
|
+
<double>0.25</double>
|
|
44
|
+
<double>0.1</double>
|
|
45
|
+
</resolutions>
|
|
46
|
+
<scaleNames>
|
|
47
|
+
<string>EPSG:21781:0</string>
|
|
48
|
+
<string>EPSG:21781:1</string>
|
|
49
|
+
<string>EPSG:21781:2</string>
|
|
50
|
+
<string>EPSG:21781:3</string>
|
|
51
|
+
<string>EPSG:21781:4</string>
|
|
52
|
+
<string>EPSG:21781:5</string>
|
|
53
|
+
<string>EPSG:21781:6</string>
|
|
54
|
+
<string>EPSG:21781:7</string>
|
|
55
|
+
<string>EPSG:21781:8</string>
|
|
56
|
+
<string>EPSG:21781:9</string>
|
|
57
|
+
<string>EPSG:21781:10</string>
|
|
58
|
+
<string>EPSG:21781:11</string>
|
|
59
|
+
<string>EPSG:21781:12</string>
|
|
60
|
+
<string>EPSG:21781:13</string>
|
|
61
|
+
<string>EPSG:21781:14</string>
|
|
62
|
+
<string>EPSG:21781:15</string>
|
|
63
|
+
<string>EPSG:21781:16</string>
|
|
64
|
+
<string>EPSG:21781:17</string>
|
|
65
|
+
<string>EPSG:21781:18</string>
|
|
66
|
+
<string>EPSG:21781:19</string>
|
|
67
|
+
<string>EPSG:21781:20</string>
|
|
68
|
+
<string>EPSG:21781:21</string>
|
|
69
|
+
<string>EPSG:21781:22</string>
|
|
70
|
+
<string>EPSG:21781:23</string>
|
|
71
|
+
<string>EPSG:21781:24</string>
|
|
72
|
+
<string>EPSG:21781:25</string>
|
|
73
|
+
<string>EPSG:21781:26</string>
|
|
74
|
+
<string>EPSG:21781:27</string>
|
|
75
|
+
<string>EPSG:21781:28</string>
|
|
76
|
+
</scaleNames>
|
|
77
|
+
<tileHeight>256</tileHeight>
|
|
78
|
+
<tileWidth>256</tileWidth>
|
|
79
|
+
<yCoordinateFirst>false</yCoordinateFirst>
|
|
80
|
+
<alignTopLeft>false</alignTopLeft>
|
|
81
|
+
<metersPerUnit>1.0</metersPerUnit>
|
|
82
|
+
<pixelSize>2.8E-4</pixelSize>
|
|
83
|
+
</gridSet>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "geoservercloud"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.3.dev4"
|
|
4
4
|
description = "Lightweight Python client to interact with GeoServer Cloud REST API, GeoServer ACL and OGC services"
|
|
5
5
|
authors = ["Camptocamp <info@camptocamp.com>"]
|
|
6
6
|
license = "BSD-2-Clause"
|
|
@@ -33,9 +33,7 @@ enable = false
|
|
|
33
33
|
vcs = "git"
|
|
34
34
|
pattern = "^(?P<base>\\d+(\\.\\d+)*)"
|
|
35
35
|
format-jinja = """
|
|
36
|
-
{%- if
|
|
37
|
-
{{serialize_pep440(bump_version(base, 1 if env.get("IS_MASTER") == "TRUE" else 2), dev=distance)}}
|
|
38
|
-
{%- elif distance == 0 -%}
|
|
36
|
+
{%- if distance == 0 -%}
|
|
39
37
|
{{serialize_pep440(base)}}
|
|
40
38
|
{%- else -%}
|
|
41
39
|
{{serialize_pep440(bump_version(base), dev=distance)}}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|