Skip to content

Commit 38ef741

Browse files
authored
Merge branch 'geopython:master' into slow-postgresql-performance-with-large-datasets
2 parents ae7694b + 3187279 commit 38ef741

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

docs/source/publishing/ogcapi-tiles.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ This code block shows how to configure pygeoapi to read map tiles from a WMTS.
196196
options:
197197
wmts_layer: camb:hex350_grid_mental_1920 # the layer name of the wmts
198198
wmts_tile_matrix_set: WebMercatorQuad # the name of the tile matrix set of the wmts.
199+
wmts_style: camb:hex350_grid_mental_1920 # the style identifier of the wmts. If empty or this key is missing, it falls back to the default style.
199200
scheme: WebMercatorQuad # the aligning scheme in pygeoapi.
200201
zoom:
201202
min: 0

pygeoapi/api/itemtypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
from collections import ChainMap
3939
from copy import deepcopy
40-
from datetime import datetime
40+
from datetime import datetime, UTC
4141
from http import HTTPStatus
4242
import logging
4343
from typing import Any, Tuple, Union
@@ -625,7 +625,7 @@ def get_collection_items(
625625
'href': '/'.join(uri.split('/')[:-1])
626626
})
627627

628-
content['timeStamp'] = datetime.utcnow().strftime(
628+
content['timeStamp'] = datetime.now(UTC).strftime(
629629
'%Y-%m-%dT%H:%M:%S.%fZ')
630630

631631
# Set response language to requested provider locale

pygeoapi/provider/wmts_facade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def get_tiles(self, layer=None, tileset=None,
161161
'tileMatrix': z,
162162
'tileRow': y,
163163
'tileCol': x,
164-
'style': ''
164+
'style': self.options.get('wmts_style', '')
165165
}
166166

167167
if '?' in self.data:

pygeoapi/templates/collections/items/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<script src="https://unpkg.com/leaflet.markercluster/dist/leaflet.markercluster-src.js"></script>
1919

2020
{% if data['itemtype'] == 'record' %}
21-
<link rel="stylesheet" href="https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"></script>
21+
<link rel="stylesheet" href="https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"/>
2222
<script src="https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js"></script>
2323
{% endif %}
2424
{% endblock %}

tests/load_tinydb_records.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# =================================================================
22
#
33
# Authors: Tom Kralidis <tomkralidis@gmail.com>
4+
# Francesco Bartoli <xbartolone@gmail.com>
45
#
56
# Copyright (c) 2025 Tom Kralidis
7+
# Copyright (c) 2025 Francesco Bartoli
68
#
79
# Permission is hereby granted, free of charge, to any person
810
# obtaining a copy of this software and associated documentation
@@ -27,7 +29,7 @@
2729
#
2830
# =================================================================
2931

30-
from datetime import datetime
32+
from datetime import datetime, UTC
3133
from pathlib import Path
3234
import sys
3335
from typing import Union
@@ -226,7 +228,7 @@ def get_anytext(bag: Union[list, str]) -> str:
226228
'geometry': geometry,
227229
'properties': {
228230
'created': issued,
229-
'updated': datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ'),
231+
'updated': datetime.now(UTC).strftime('%Y-%m-%dT%H:%M:%SZ'),
230232
'type': type_,
231233
'title': title,
232234
'description': description,

0 commit comments

Comments
 (0)