Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract Test 13 clarification #187

Closed
tomkralidis opened this issue Dec 27, 2021 · 4 comments
Closed

Abstract Test 13 clarification #187

tomkralidis opened this issue Dec 27, 2021 · 4 comments
Assignees
Projects

Comments

@tomkralidis
Copy link

Describe the bug
Abstract Test 13 is possibly sending an items query with an erroneous bbox parameter,

To Reproduce
Steps to reproduce the behavior:

  1. Run a CITE session against https://demo.pygeoapi.io/cite
  2. Click on error at line java.lang.AssertionError: 1 expectation failed. Expected status code <200> but was <400>

Expected behavior

The ETS should send a valid bbox to the OAFeat server, or if it is sending an invalid bbox by design, allow for a 400 response.

Screenshots
image

https://demo.pygeoapi.io/cite/collections/canada-hydat-daily-mean-02hc003/items?bbox=177.0000000%2C65.0000000%2C-177.0000000%2C70.0000000

Additional context
Request params: bbox=177.0000000,65.0000000,-177.0000000,70.0000000 (looks like minx > maxx?)

@dstenger
Copy link
Contributor

dstenger commented Jan 3, 2022

Thank you for reporting.

The code leading to this bounding box is found here:

@DataProvider(name = "collectionItemUrisWithBboxes")
public Iterator<Object[]> collectionItemUrisWithBboxes( ITestContext testContext ) {
List<Object[]> collectionsWithBboxes = new ArrayList<>();
for ( Map<String, Object> collection : collections ) {
BBox extent = parseSpatialExtent( collection );
if ( extent != null ) {
collectionsWithBboxes.add( new Object[] { collection, extent } );
// These should include test cases which cross the
// meridian,
collectionsWithBboxes.add( new Object[] { collection, new BBox( -1.5, 50.0, 1.5, 53.0 ) } );
// equator,
collectionsWithBboxes.add( new Object[] { collection, new BBox( -80.0, -5.0, -70.0, 5.0 ) } );
// 180 longitude,
collectionsWithBboxes.add( new Object[] { collection, new BBox( 177.0, 65.0, -177.0, 70.0 ) } );
// and polar regions.
collectionsWithBboxes.add( new Object[] { collection, new BBox( -180.0, 85.0, 180.0, 90.0 ) } );
collectionsWithBboxes.add( new Object[] { collection, new BBox( -180.0, -90.0, 180.0, -85.0 ) } );
}
}
return collectionsWithBboxes.iterator();
}

The pre-defined bounding boxes are not required by the standard anymore but were part of an earlier version of the standard (pre-version).

I also agree that your referenced bounding box looks strange.

However, I propose to remove all predefined bound boxes from the test suite as they are not required anymore.

@dstenger dstenger added this to To do in CITE via automation Jan 3, 2022
@dstenger dstenger moved this from To do to Needs discussion in CITE Jan 3, 2022
@cportele
Copy link
Member

cportele commented Jan 3, 2022

Abstract Test 13 is possibly sending an items query with an erroneous bbox parameter

A bounding box 177.0, 65.0, -177.0, 70.0 is a valid bounding box that crosses the antimeridian and the result must be a 200 not a 400. The spec says:

For WGS 84 longitude/latitude the values are in most cases the sequence of minimum longitude, minimum latitude, maximum longitude and maximum latitude. However, in cases where the box spans the antimeridian the first value (west-most box edge) is larger than the third value (east-most box edge).

@dstenger
Copy link
Contributor

dstenger commented Jan 3, 2022

@cportele Thank you for clarification.

Thus, there is no actual need to remove the pre-defined bounding boxes.

@tomkralidis tomkralidis changed the title Abstract Test 13 errors Abstract Test 13 clarification Jan 3, 2022
@tomkralidis
Copy link
Author

Thanks for the clarification, makes sense. pygeoapi has been updated as a result and now passes this test. Thank you CITE!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
CITE
  
Done
Development

No branches or pull requests

5 participants