Skip to content

Commit 3a2e6fe

Browse files
committed
fix: use spec conform storage crs notation
1 parent 8a74159 commit 3a2e6fe

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

docs/source/crs.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Metadata
3030
The conformance class `http://www.opengis.net/spec/ogcapi-features-2/1.0/conf/crs` is present as a `conformsTo` field
3131
in the root landing page response.
3232

33-
The configured CRSs, or their defaults, `crs` and `storageCRS` and optionally `storageCrsCoordinateEpoch` will be present in the "Describe Collection" response.
33+
The configured CRSs, or their defaults, `crs` and `storageCrs` and optionally `storageCrsCoordinateEpoch` will be present in the "Describe Collection" response.
3434

3535
Parameters
3636
----------
@@ -95,7 +95,7 @@ Suppose an addresses collection with the following CRS support in its collection
9595
"http://www.opengis.net/def/crs/EPSG/0/28992",
9696
"http://www.opengis.net/def/crs/OGC/1.3/CRS84"
9797
],
98-
"storageCRS": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
98+
"storageCrs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
9999
100100
101101
This allows a `bbox-crs` query using Dutch "RD" coordinates with CRS `http://www.opengis.net/def/crs/EPSG/0/28992` to retrieve

pygeoapi/api/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ def _create_crs_transform_spec(
657657

658658
if not query_crs_uri:
659659
if storage_crs_uri in DEFAULT_CRS_LIST:
660-
# Could be that storageCRS is
660+
# Could be that storageCrs is
661661
# http://www.opengis.net/def/crs/OGC/1.3/CRS84h
662662
query_crs_uri = storage_crs_uri
663663
else:
@@ -714,7 +714,7 @@ def _set_content_crs_header(
714714
# If empty use default CRS
715715
storage_crs_uri = config.get('storage_crs', DEFAULT_STORAGE_CRS)
716716
if storage_crs_uri in DEFAULT_CRS_LIST:
717-
# Could be that storageCRS is one of the defaults like
717+
# Could be that storageCrs is one of the defaults like
718718
# http://www.opengis.net/def/crs/OGC/1.3/CRS84h
719719
content_crs_uri = storage_crs_uri
720720
else:
@@ -1136,7 +1136,7 @@ def describe_collections(api: API, request: APIRequest,
11361136
# OAPIF Part 2 - list supported CRSs and StorageCRS
11371137
if collection_data_type in ['edr', 'feature']:
11381138
collection['crs'] = get_supported_crs_list(collection_data, DEFAULT_CRS_LIST) # noqa
1139-
collection['storageCRS'] = collection_data.get('storage_crs', DEFAULT_STORAGE_CRS) # noqa
1139+
collection['storageCrs'] = collection_data.get('storage_crs', DEFAULT_STORAGE_CRS) # noqa
11401140
if 'storage_crs_coordinate_epoch' in collection_data:
11411141
collection['storageCrsCoordinateEpoch'] = collection_data.get('storage_crs_coordinate_epoch') # noqa
11421142

pygeoapi/api/itemtypes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,8 @@ def get_collection_items(
399399
# bbox but no bbox-crs param: assume bbox is in default CRS
400400
bbox_crs = DEFAULT_CRS
401401

402-
# Transform bbox to storageCRS
403-
# when bbox-crs different from storageCRS.
402+
# Transform bbox to storageCrs
403+
# when bbox-crs different from storageCrs.
404404
if len(bbox) > 0:
405405
try:
406406
# Get a pyproj CRS instance for the Collection's Storage CRS
@@ -1008,7 +1008,7 @@ def create_crs_transform_spec(
10081008

10091009
if not query_crs_uri:
10101010
if storage_crs_uri in DEFAULT_CRS_LIST:
1011-
# Could be that storageCRS is
1011+
# Could be that storageCrs is
10121012
# http://www.opengis.net/def/crs/OGC/1.3/CRS84h
10131013
query_crs_uri = storage_crs_uri
10141014
else:
@@ -1065,7 +1065,7 @@ def set_content_crs_header(
10651065
# If empty use default CRS
10661066
storage_crs_uri = config.get('storage_crs', DEFAULT_STORAGE_CRS)
10671067
if storage_crs_uri in DEFAULT_CRS_LIST:
1068-
# Could be that storageCRS is one of the defaults like
1068+
# Could be that storageCrs is one of the defaults like
10691069
# http://www.opengis.net/def/crs/OGC/1.3/CRS84h
10701070
content_crs_uri = storage_crs_uri
10711071
else:

pygeoapi/templates/collections/collection.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ <h3>{% trans %}Reference Systems{% endtrans %}</h3>
125125
<h3>{% trans %}Storage CRS{% endtrans %}</h3>
126126
<ul>
127127
<li>
128-
{% trans %}CRS{% endtrans %}: <a title="{{ data['storageCRS'] }}" href="{{ data['storageCRS'] }}"><span>{{ data['storageCRS'] }}</span></a>
128+
{% trans %}CRS{% endtrans %}: <a title="{{ data['storageCrs'] }}" href="{{ data['storageCrs'] }}"><span>{{ data['storageCrs'] }}</span></a>
129129
</li>
130130
<li>
131131
{% trans %}Epoch{% endtrans %}: <span>{{ data['storageCrsCoordinateEpoch'] or '_(not specified)' }}</span></a>
@@ -148,8 +148,8 @@ <h3>{% trans %}Storage CRS{% endtrans %}</h3>
148148

149149
{# if this collection has a map representation, add it to the map #}
150150
{% for link in data['links'] %}
151-
{% if link['rel'] == 'http://www.opengis.net/def/rel/ogc/1.0/map' and link['href'] %}
152-
L.tileLayer.wms("{{ link['href'] }}", {"opacity": .7, "transparent": true, "crs": L.CRS.EPSG4326}).addTo(map);
151+
{% if link['rel'] == 'http://www.opengis.net/def/rel/ogc/1.0/map' and link['href'] %}
152+
L.tileLayer.wms("{{ link['href'] }}", {"opacity": .7, "transparent": true, "crs": L.CRS.EPSG4326}).addTo(map);
153153
{% endif %}
154154
{% endfor %}
155155

tests/test_ogr_gpkg_provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def config_gpkg_28992():
136136
'http://www.opengis.net/def/crs/OGC/1.3/CRS84',
137137
'http://www.opengis.net/def/crs/EPSG/0/28992'
138138
],
139-
'storageCRS': 'http://www.opengis.net/def/crs/EPSG/0/28992',
139+
'storageCrs': 'http://www.opengis.net/def/crs/EPSG/0/28992',
140140
'id_field': 'id',
141141
'layer': 'OGRGeoJSON'
142142
}

tests/test_ogr_wfs_provider_live.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def config_geosol_gs_WFS():
140140
'http://www.opengis.net/def/crs/OGC/1.3/CRS84',
141141
'http://www.opengis.net/def/crs/EPSG/0/32632'
142142
],
143-
'storageCRS': 'http://www.opengis.net/def/crs/EPSG/0/32632',
143+
'storageCrs': 'http://www.opengis.net/def/crs/EPSG/0/32632',
144144
'id_field': 'gml_id',
145145
'layer': 'unesco:Unesco_point',
146146
}

0 commit comments

Comments
 (0)