Skip to content

Commit 299e9dc

Browse files
committed
update tests/docs
1 parent d8d3fec commit 299e9dc

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

docs/source/cql2.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ An ``EQUALS`` example for a specific property:
103103
]
104104
}'
105105
106-
A ``CROSSES`` example via an HTTP GET request. The CQL2 text is passed via the ``filter`` parameter.
106+
A ``S_CROSSES`` example via an HTTP GET request. The CQL2 text is passed via the ``filter`` parameter.
107107

108108
.. code-block:: bash
109109
110-
curl "http://localhost:5000/collections/hot_osm_waterways/items?f=json&filter=CROSSES(foo_geom,%20LINESTRING(28%20-2,%2030%20-4))"
110+
curl "http://localhost:5000/collections/hot_osm_waterways/items?f=json&filter=S_CROSSES(foo_geom,%20LINESTRING(28%20-2,%2030%20-4))"
111111
112112
A ``DWITHIN`` example via HTTP GET and using a custom CRS for the filter geometry:
113113

@@ -122,6 +122,6 @@ The same example, but this time providing a geometry in EWKT format:
122122
123123
curl "http://localhost:5000/collections/beni/items?filter=DWITHIN(geometry,SRID=3857;POINT(1392921%205145517),100,meters)"
124124
125-
Note that the CQL2 text has been URL encoded. This is required in curl commands but when entering in a browser, plain text can be used e.g. ``CROSSES(foo_geom, LINESTRING(28 -2, 30 -4))``.
125+
Note that the CQL2 text has been URL encoded. This is required in curl commands but when entering in a browser, plain text can be used e.g. ``S_CROSSES(foo_geom, LINESTRING(28 -2, 30 -4))``.
126126

127127
.. _`OGC Common Query Language`: https://docs.ogc.org/is/21-065r2/21-065r2.html

tests/other/test_crs.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Authors: Tom Kralidis <tomkralidis@gmail.com>
44
#
5-
# Copyright (c) 2025 Tom Kralidis
5+
# Copyright (c) 2026 Tom Kralidis
66
#
77
# Permission is hereby granted, free of charge, to any person
88
# obtaining a copy of this software and associated documentation
@@ -201,7 +201,7 @@ def test_transform_bbox():
201201

202202
@pytest.mark.parametrize('original_filter, filter_crs, storage_crs, geometry_colum_name, expected', [ # noqa
203203
pytest.param(
204-
'INTERSECTS(geometry, POINT(1 1))',
204+
'S_INTERSECTS(geometry, POINT(1 1))',
205205
'http://www.opengis.net/def/crs/OGC/1.3/CRS84',
206206
None,
207207
None,
@@ -212,7 +212,7 @@ def test_transform_bbox():
212212
id='passthrough'
213213
),
214214
pytest.param(
215-
'INTERSECTS(geometry, POINT(1 1))',
215+
'S_INTERSECTS(geometry, POINT(1 1))',
216216
'http://www.opengis.net/def/crs/OGC/1.3/CRS84',
217217
None,
218218
'custom_geom_name',
@@ -223,7 +223,7 @@ def test_transform_bbox():
223223
id='unnested-geometry-name'
224224
),
225225
pytest.param(
226-
'some_attribute = 10 AND INTERSECTS(geometry, POINT(1 1))',
226+
'some_attribute = 10 AND S_INTERSECTS(geometry, POINT(1 1))',
227227
'http://www.opengis.net/def/crs/OGC/1.3/CRS84',
228228
None,
229229
'custom_geom_name',
@@ -238,7 +238,7 @@ def test_transform_bbox():
238238
id='nested-geometry-name'
239239
),
240240
pytest.param(
241-
'(some_attribute = 10 AND INTERSECTS(geometry, POINT(1 1))) OR '
241+
'(some_attribute = 10 AND S_INTERSECTS(geometry, POINT(1 1))) OR '
242242
'DWITHIN(geometry, POINT(2 2), 10, meters)',
243243
'http://www.opengis.net/def/crs/OGC/1.3/CRS84',
244244
None,
@@ -262,7 +262,7 @@ def test_transform_bbox():
262262
id='complex-filter-name'
263263
),
264264
pytest.param(
265-
'INTERSECTS(geometry, POINT(12.512829 41.896698))',
265+
'S_INTERSECTS(geometry, POINT(12.512829 41.896698))',
266266
'http://www.opengis.net/def/crs/OGC/1.3/CRS84',
267267
'http://www.opengis.net/def/crs/EPSG/0/3004',
268268
None,
@@ -273,7 +273,7 @@ def test_transform_bbox():
273273
id='unnested-geometry-transformed-coords'
274274
),
275275
pytest.param(
276-
'some_attribute = 10 AND INTERSECTS(geometry, POINT(12.512829 41.896698))', # noqa
276+
'some_attribute = 10 AND S_INTERSECTS(geometry, POINT(12.512829 41.896698))', # noqa
277277
'http://www.opengis.net/def/crs/OGC/1.3/CRS84',
278278
'http://www.opengis.net/def/crs/EPSG/0/3004',
279279
None,
@@ -288,7 +288,7 @@ def test_transform_bbox():
288288
id='nested-geometry-transformed-coords'
289289
),
290290
pytest.param(
291-
'(some_attribute = 10 AND INTERSECTS(geometry, POINT(12.512829 41.896698))) OR ' # noqa
291+
'(some_attribute = 10 AND S_INTERSECTS(geometry, POINT(12.512829 41.896698))) OR ' # noqa
292292
'DWITHIN(geometry, POINT(12 41), 10, meters)',
293293
'http://www.opengis.net/def/crs/OGC/1.3/CRS84',
294294
'http://www.opengis.net/def/crs/EPSG/0/3004',
@@ -312,7 +312,7 @@ def test_transform_bbox():
312312
id='complex-filter-transformed-coords'
313313
),
314314
pytest.param(
315-
'INTERSECTS(geometry, SRID=3857;POINT(1392921 5145517))',
315+
'S_INTERSECTS(geometry, SRID=3857;POINT(1392921 5145517))',
316316
'http://www.opengis.net/def/crs/OGC/1.3/CRS84',
317317
'http://www.opengis.net/def/crs/EPSG/0/3004',
318318
None,
@@ -323,7 +323,7 @@ def test_transform_bbox():
323323
id='unnested-geometry-transformed-coords-explicit-input-crs-ewkt'
324324
),
325325
pytest.param(
326-
'INTERSECTS(geometry, POINT(1392921 5145517))',
326+
'S_INTERSECTS(geometry, POINT(1392921 5145517))',
327327
'http://www.opengis.net/def/crs/EPSG/0/3857',
328328
'http://www.opengis.net/def/crs/EPSG/0/3004',
329329
None,
@@ -334,7 +334,7 @@ def test_transform_bbox():
334334
id='unnested-geometry-transformed-coords-explicit-input-crs-filter-crs'
335335
),
336336
pytest.param(
337-
'INTERSECTS(geometry, SRID=3857;POINT(1392921 5145517))',
337+
'S_INTERSECTS(geometry, SRID=3857;POINT(1392921 5145517))',
338338
'http://www.opengis.net/def/crs/OGC/1.3/CRS84',
339339
'http://www.opengis.net/def/crs/EPSG/0/3004',
340340
None,
@@ -345,7 +345,7 @@ def test_transform_bbox():
345345
id='unnested-geometry-transformed-coords-ewkt-crs-overrides-filter-crs'
346346
),
347347
pytest.param(
348-
'INTERSECTS(geometry, POINT(12.512829 41.896698))',
348+
'S_INTERSECTS(geometry, POINT(12.512829 41.896698))',
349349
'http://www.opengis.net/def/crs/OGC/1.3/CRS84',
350350
'http://www.opengis.net/def/crs/EPSG/0/3004',
351351
'custom_geom_name',

tests/provider/test_postgresql_provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def test_get_not_existing_item_raise_exception(config):
421421
("osm_id BETWEEN 80800000 AND 80900000 AND BBOX(foo_geom, 29, -2.8, 29.2, -2.9)", # noqa
422422
[80827793, 80835470, 80835472, 80835483, 80835489]),
423423
("osm_id BETWEEN 80800000 AND 80900000 AND "
424-
"CROSSES(foo_geom, LINESTRING(29.091 -2.731, 29.253 -2.845))",
424+
"S_CROSSES(foo_geom, LINESTRING(29.091 -2.731, 29.253 -2.845))",
425425
[80835470, 80835472, 80835489])
426426
])
427427
def test_query_cql(config, cql, expected_ids):

0 commit comments

Comments
 (0)