Skip to content

Commit 38f21ba

Browse files
authored
Merge pull request #443 from opengeospatial/add-missing-test
Add missing Radius tests
2 parents c326b15 + 2b9e337 commit 38f21ba

File tree

6 files changed

+173
-6
lines changed

6 files changed

+173
-6
lines changed

standard/abstract_tests/ATS_class_queries.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ conformance-test:: /conf/collections/rc-f-response-locations
128128

129129
include::queries/ATS_position.adoc[]
130130

131+
===== Radius
131132

133+
include::queries/ATS_radius.adoc[]
132134

133135
===== Area
134136

standard/abstract_tests/collections/ATS_rc-coords-response.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ test-method::
1111
--
1212
. Verify that only resources that have a spatial geometry that intersects the coordinates are returned as part of the result set.
1313
. Verify `coords` values are valid for the specified coordinate reference system
14-
. Verify that the coordinate reference system of the geometries is valid for the parameter defined by `crs`. If the `crs` parameter is not defined the geometries shall be valid for WGS 84 longitude/latitude (`http://www.opengis.net/def/crs/OGC/1.3/CRS84` or `http://www.opengis.net/def/crs/OGC/0/CRS84h`).
14+
. Verify that the coordinate reference system of the geometries is valid for the parameter defined by `crs`. If the `crs` parameter is not defined the geometries shall be valid for the coordinate reference system defined by the spatial element of the extent section in the collection response.
1515
--
16-
====
16+
====
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
[[ats_radius]]
2+
[abstract_test]
3+
====
4+
[%metadata]
5+
identifier:: /conf/radius/no-query-params
6+
target:: /req/queries/radius
7+
test-purpose:: Validate that an error is returned by a `radius` query if no query parameters are specified.
8+
test-method::
9+
step::: No query parameters are specified
10+
step::: Validate that a document was returned with a status code 400.
11+
====
12+
13+
[abstract_test]
14+
====
15+
[%metadata]
16+
identifier:: /conf/radius/no-coords-param
17+
target:: /req/queries/radius
18+
test-purpose:: Validate that an error is returned by a `radius` query when the coords query parameter is not specified.
19+
test-method::
20+
step::: coords query parameter is not specified
21+
step::: Validate that a document was returned with a status code 400.
22+
====
23+
24+
25+
[abstract_test]
26+
====
27+
[%metadata]
28+
identifier:: /conf/radius/coords-param-invalid
29+
target:: /req/queries/radius
30+
test-purpose:: Validate that an error is returned by a `radius` query when the coords query parameter does not contain a valid POINT or MULTIPOINT Well Known Text value.
31+
test-method::
32+
step::: Check coords query parameter is a valid Well Known Text Point or MultiPoint value
33+
step::: Validate that a document was returned with a status code 400.
34+
====
35+
36+
[abstract_test]
37+
====
38+
[%metadata]
39+
identifier:: /conf/radius/no-within-param
40+
target:: /req/queries/radius
41+
test-purpose:: Validate that an error is returned by a `radius` query when the within query parameter is not specified.
42+
test-method::
43+
step::: within query parameter is not specified
44+
step::: Validate that a document was returned with a status code 400.
45+
====
46+
47+
[abstract_test]
48+
====
49+
[%metadata]
50+
identifier:: /conf/radius/no-within_units-param
51+
target:: /req/queries/radius
52+
test-purpose:: Validate that an error is returned by a `radius` query when the within_units query parameter is not specified.
53+
test-method::
54+
step::: within_units query parameter is not specified
55+
step::: Validate that a document was returned with a status code 400.
56+
====
57+
58+
59+
[abstract_test]
60+
====
61+
[%metadata]
62+
identifier:: /conf/radius/valid-query-params
63+
target:: /req/queries/radius
64+
test-purpose:: Validate that resources can be identified and extracted from a Collection with a `radius` query using query parameters.
65+
test-method::
66+
+
67+
--
68+
. Test with valid query parameters
69+
. Validate that a document was returned with a status code 200.
70+
71+
Repeat these tests using the following parameter tests:
72+
73+
*Coordinates*
74+
75+
* Parameter <<req_edr_coords-definition,/req/edr/coords-definition>>
76+
* Response <<req_edr_point-coords-response,/req/edr/point-coords-response>>
77+
78+
*VerticalLevel*
79+
80+
* Parameter <<req_edr_z-definition,/req/edr/z-definition>>
81+
* Response <<req_edr_z-response,/req/edr/z-response>>
82+
83+
*Parameters*
84+
85+
* Parameter <<req_edr_parameters-definition,/req/edr/REQ_rc-parameter-name-definition>>
86+
* Response <<req_edr_parameters-response,/req/edr/parameter-name-response>>
87+
88+
*DateTime*
89+
90+
* Parameter <<req_collections_rc-time-definition,/req/core/datetime-definition>>
91+
* Response <<req_core_rc-time-response,/req/core/datetime-response>>
92+
93+
94+
Execute requests with combinations of the "coords","time","parameter-name","z","crs" and "f" query parameters
95+
and verify that only information that matches the selection criteria is returned.
96+
--
97+
====
98+
99+
100+
include::../collections/radius/ATS_rc-coords-definition.adoc[]
101+
102+
include::../collections/radius/ATS_rc-coords-response.adoc[]
103+
104+
include::../collections/radius/ATS_rc-z-definition.adoc[]
105+
106+
include::../collections/radius/ATS_rc-z-response.adoc[]
107+
108+
109+
include::../core/radius/ATS_rc-time-definition.adoc[]
110+
111+
include::../core/radius/ATS_rc-time-response.adoc[]
112+
113+
114+
115+
include::../collections/radius/ATS_rc-parameter-name-definition.adoc[]
116+
117+
include::../collections/radius/ATS_rc-parameter-name-response.adoc[]
118+
119+
120+
121+
include::../collections/radius/ATS_rc-crs-definition.adoc[]
122+
123+
include::../collections/radius/ATS_rc-crs-response.adoc[]
124+
125+
126+
127+
include::../collections/radius/ATS_rc-f-definition.adoc[]
128+
129+
include::../collections/radius/ATS_rc-f-response.adoc[]

standard/code/generate_query_tests.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ def generate(infile_path,outfile_path,querytype):
1313
if querytype == "position":
1414
fout.write(line.replace("/req/edr/coords-response","/req/edr/point-coords-response"))
1515
print(line.replace("/req/edr/coords-response","/req/edr/point-coords-response").replace("\n",""))
16+
elif querytype == "radius":
17+
fout.write(line.replace("/req/edr/coords-response","/req/edr/point-coords-response"))
18+
print(line.replace("/req/edr/coords-response","/req/edr/point-coords-response").replace("\n",""))
1619
elif querytype == "trajectory":
1720
fout.write(line.replace("/req/edr/coords-response","/req/edr/linestring-coords-response"))
1821
print(line.replace("/req/edr/coords-response","/req/edr/linestring-coords-response").replace("\n",""))
@@ -68,6 +71,22 @@ def generate(infile_path,outfile_path,querytype):
6871
generate('./abstract_tests/collections/ATS_rc-f-definition.adoc','./abstract_tests/collections/position/ATS_rc-f-definition.adoc','position')
6972
generate('./abstract_tests/collections/ATS_rc-f-response.adoc','./abstract_tests/collections/position/ATS_rc-f-response.adoc','position')
7073

74+
#radius
75+
76+
generate('./abstract_tests/collections/ATS_rc-coords-definition.adoc','./abstract_tests/collections/radius/ATS_rc-coords-definition.adoc','radius')
77+
generate('./abstract_tests/collections/ATS_rc-coords-response.adoc','./abstract_tests/collections/radius/ATS_rc-coords-response.adoc','radius')
78+
generate('./abstract_tests/collections/ATS_rc-z-definition.adoc','./abstract_tests/collections/radius/ATS_rc-z-definition.adoc','radius')
79+
generate('./abstract_tests/collections/ATS_rc-z-response.adoc','./abstract_tests/collections/radius/ATS_rc-z-response.adoc','radius')
80+
generate('./abstract_tests/collections/ATS_rc-parameter-name-definition.adoc','./abstract_tests/collections/radius/ATS_rc-parameter-name-definition.adoc','radius')
81+
generate('./abstract_tests/collections/ATS_rc-parameter-name-response.adoc','./abstract_tests/collections/radius/ATS_rc-parameter-name-response.adoc','radius')
82+
generate('./abstract_tests/collections/ATS_rc-crs-definition.adoc','./abstract_tests/collections/radius/ATS_rc-crs-definition.adoc','radius')
83+
generate('./abstract_tests/collections/ATS_rc-crs-response.adoc','./abstract_tests/collections/radius/ATS_rc-crs-response.adoc','radius')
84+
generate('./abstract_tests/core/ATS_rc-time-definition.adoc','./abstract_tests/core/radius/ATS_rc-time-definition.adoc','radius')
85+
generate('./abstract_tests/core/ATS_rc-time-response.adoc','./abstract_tests/core/radius/ATS_rc-time-response.adoc','radius')
86+
generate('./abstract_tests/collections/ATS_rc-f-definition.adoc','./abstract_tests/collections/radius/ATS_rc-f-definition.adoc','radius')
87+
generate('./abstract_tests/collections/ATS_rc-f-response.adoc','./abstract_tests/collections/radius/ATS_rc-f-response.adoc','radius')
88+
89+
7190
#cube
7291

7392
# The coords param tests have been commented out because they are not supported by the Cube query.

standard/requirements/edr/REQ_rc-coords-response.adoc

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,27 @@ The coordinates SHALL consist of a Well Known Text (WKT) geometry string.
1818
---
1919
*C:*
2020
21-
The coordinate reference system of the values SHALL be interpreted as WGS84 longitude/latitude
21+
[[req_edr_coords-response]]
22+
==== *Requirement /req/edr/coords-response* Parameter coords response
23+
24+
[requirement]
25+
====
26+
[%metadata]
27+
identifier:: /req/edr/coords-response
28+
29+
*A:*
2230

31+
Only those resources that have a spatial geometry that intersects the area defined by the `coords` parameter SHALL be part of the result set.
32+
33+
---
34+
*B:*
35+
36+
The coordinates SHALL consist of a Well Known Text (WKT) geometry string.
37+
38+
---
39+
*C:*
2340

24-
WKT: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84", 6378137, 298.257223563, AUTHORITY["EPSG", "7030"]], AUTHORITY["EPSG", "6326"]], PRIMEM["Greenwich", 0 , AUTHORITY["EPSG", "8901"]], UNIT["degree", 0.01745329251994328, AUTHORITY["EPSG", "9122"]], AUTHORITY["EPSG", "4326"]]
41+
If a coordinate reference system **is not** specified in a parameter `crs`, the crs SHALL be value defined in the spatial element of the extent section in the collection response.
2542

26-
unless a different coordinate reference system is specified in a parameter `crs`.
43+
2744
====

standard/requirements/edr/REQ_rc-crs-response.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ identifier:: /req/edr/REQ_rc-crs-response
88
99
*A:*
1010
11-
If the `crs` parameter is provided, the returned information should be reprojected (if required) to the defined coordinate system. If the `crs` parameter is not specified the data will be returned in its native projection.
11+
If the `crs` parameter is provided, the returned information should be reprojected (if required) to the defined coordinate system. If the `crs` parameter is not specified the data SHALL be returned in the coordinate reference system defined by the spatial element of the extent section in the collection.
1212
1313
---
1414
*B:*

0 commit comments

Comments
 (0)