Skip to content

Commit

Permalink
Changed all 'polygon' keys to a intersectsWith: polygon((*))
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameronsplaze committed Aug 24, 2023
1 parent 1ccac58 commit 9383edb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 41 deletions.
2 changes: 1 addition & 1 deletion yml_tests/test_Baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ tests:
output: download
# use_maturity: True

expected file: download
expected file: x-python
expected code: 200

- baseline jsonlite:
Expand Down
39 changes: 20 additions & 19 deletions yml_tests/test_URLs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ tests:
granule_list: S1B_S6_GRDH_1SDV_20190911T214309_20190911T214338_017995_021E10_5CCB
output: download

expected file: download
expected file: x-python
expected code: 200

#In CMR reporting script, we report groupid as null on most datasets. Some datasets updated to expect blank file & moved to partial pass yaml
Expand Down Expand Up @@ -955,7 +955,7 @@ tests:
maxResults: 200
output: download

expected file: download
expected file: x-python
expected code: 200

- output download Avnir:
Expand All @@ -964,7 +964,7 @@ tests:
maxResults: 2
output: download

expected file: download
expected file: x-python
expected code: 200

- output geojson Sentinel:
Expand Down Expand Up @@ -1073,7 +1073,8 @@ tests:

- platform J1:
platform: J1
polygon: -141.7461,64.8261,-140.3172,63.5722,-137.8891,64.7214,-141.7461,64.8261
# polygon: -141.7461,64.8261,-140.3172,63.5722,-137.8891,64.7214,-141.7461,64.8261
intersectsWith: POLYGON((-141.7461 64.8261, -140.3172 63.5722, -137.8891 64.7214, -141.7461 64.8261))
maxResults: 100
output: csv

Expand All @@ -1083,7 +1084,8 @@ tests:
- platform A3:
platform: A3
processingLevel: L1.0
polygon: -148.52,64.63,-150.41,64.64,-149.58,63.86,-148.52,64.63
# polygon: -148.52,64.63,-150.41,64.64,-149.58,63.86,-148.52,64.63
intersectsWith: POLYGON((-148.52 64.63, -150.41 64.64, -149.58 63.86, -148.52 64.63))
maxResults: 100
output: csv

Expand Down Expand Up @@ -1936,24 +1938,19 @@ tests:
expected file: jsonlite
expected code: 200

- polygon:
polygon: -148.52,64.63,-150.41,64.64,-149.58,63.86,-148.52,64.63
- polygon lowercase:
# polygon: -148.52,64.63,-150.41,64.64,-149.58,63.86,-148.52,64.63
intersectsWith: polygon(( -148.52,64.63 -150.41,64.64, -149.58,63.86 -148.52,64.63 ))
maxResults: 100
output: csv

expected file: csv
expected code: 200

- polygon uppercase:
POLYGON: -148.52,64.63,-150.41,64.64,-149.58,63.86,-148.52,64.63
maxResults: 100
output: csv

expected file: csv
expected code: 200

- polygon multi:
polygon: 12.13,41.74,13.4,41.74,13.4,42.75,12.13,42.75,12.13,41.74
# polygon: 12.13,41.74,13.4,41.74,13.4,42.75,12.13,42.75,12.13,41.74
intersectsWith: POLYGON((12.13 41.74, 13.4 41.74, 13.4 42.75, 12.13 42.75, 12.13 41.74))
platform: Sentinel-1A,Sentinel-1B
processingLevel: SLC
start: 2015-05-01T00:00:00UTC
Expand All @@ -1964,7 +1961,8 @@ tests:
expected code: 200

- polygon closure 1:
polygon: 12.13,41.74,13.4,41.74,13.4,42.75,12.13,42.75
# polygon: 12.13,41.74,13.4,41.74,13.4,42.75,12.13,42.75
intersectsWith: POLYGON((12.13 41.74, 13.4 41.74, 13.4 42.75, 12.13 42.75))
platform: Sentinel-1A,Sentinel-1B
processingLevel: SLC
start: 2015-05-01T00:00:00UTC
Expand All @@ -1975,7 +1973,8 @@ tests:
expected code: 200

- polygon closure 2:
polygon: 12.13,41.74,13.4,41.74,13.4,42.75,12.13,42.75,12.13,41.74
# polygon: 12.13,41.74,13.4,41.74,13.4,42.75,12.13,42.75,12.13,41.74
intersectsWith: POLYGON((12.13 41.74, 13.4 41.74, 13.4 42.75, 12.13 42.75, 12.13 41.74))
platform: Sentinel-1A,Sentinel-1B
processingLevel: SLC
start: 2015-05-01T00:00:00UTC
Expand All @@ -1986,7 +1985,8 @@ tests:
expected code: 200

- polygon closure 3:
polygon: 12.13,41.74,12.13,42.75,13.4,42.75,13.4,41.74,12.13,41.74
# polygon: 12.13,41.74,12.13,42.75,13.4,42.75,13.4,41.74,12.13,41.74
intersectsWith: POLYGON(( 12.13 41.74, 12.13 42.75, 13.4 42.75, 13.4 41.74, 12.13 41.74 ))
platform: Sentinel-1A,Sentinel-1B
processingLevel: SLC
start: 2015-05-01T00:00:00UTC
Expand All @@ -1997,7 +1997,8 @@ tests:
expected code: 200

- polygon closure 4:
polygon: -155.08,65.82,-153.5,61.91,-149.50,63.07,-149.94,64.55
# polygon: -155.08,65.82,-153.5,61.91,-149.50,63.07,-149.94,64.55
intersectsWith: POLYGON(( -155.08 65.82, -153.5 61.91, -149.50 63.07, -149.94 64.55 ))
maxResults: 100
output: Csv

Expand Down
31 changes: 10 additions & 21 deletions yml_tests/test_URLs_expected_400.yml
Original file line number Diff line number Diff line change
Expand Up @@ -672,47 +672,35 @@ tests:
expected code: 400

- polygon 3 points invalid:
polygon: -155.08,65.82,-153.5
# polygon: -155.08,65.82,-153.5
intersectsWith: POLYGON((-155.08 65.82, -153.5))
maxResults: 1000
output: csv

expected file: error json
expected code: 400

- polygon 2 points invalid:
polygon: -155.08,65.82
# polygon: -155.08,65.82
intersectsWith: POLYGON((-155.08 65.82))
maxResults: 1000
output: csv

expected file: error json
expected code: 400

- polygon 2 points count invalid:
polygon: -155.08,65.82
# polygon: -155.08,65.82
intersectsWith: POLYGON((-155.08 65.82))
maxResults: 1000
output: count

expected file: error json
expected code: 400

- polygon specchar invalid:
polygon: ~!
maxResults: 1000
output: csv

expected file: error json
expected code: 400

- polygon specchar count invalid:
polygon: -#
maxResults: 1000
output: count

expected file: error json
expected code: 400

- polygon test invalid:
polygon: test
- intersectsWith test invalid:
intersectsWith: test
maxResults: 1000
output: csv

Expand Down Expand Up @@ -929,7 +917,8 @@ tests:
expected code: 400

- realworld 9 invalid:
polygon: 4794886.03996192,2658783.7409794466,4911667.405803877,2658783.7409794466,4911667.405803877,2775921.3473827764,4794886.03996192,2775921.3473827764,4794886.03996192,2658783.7409794466
# polygon: 4794886.03996192,2658783.7409794466,4911667.405803877,2658783.7409794466,4911667.405803877,2775921.3473827764,4794886.03996192,2775921.3473827764,4794886.03996192,2658783.7409794466
intersectsWith: POLYGON((4794886.03996192 2658783.7409794466, 4911667.405803877 2658783.7409794466, 4911667.405803877 2775921.3473827764, 4794886.03996192 2775921.3473827764, 4794886.03996192 2658783.7409794466))
maxResults: 1000
output: csv

Expand Down

0 comments on commit 9383edb

Please sign in to comment.