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

SpatialJoinTest.joinWithIntersects won't work unless there are two feature types with surface properties #80

Closed
aaime opened this issue Nov 29, 2017 · 7 comments
Assignees
Milestone

Comments

@aaime
Copy link
Contributor

aaime commented Nov 29, 2017

This test seems to have been incompletely coded and works only if two surface properties can be found in different feature types:

If someone is running the CITE WFS 1.1 datasets surfaceProps, curveProps and pointProps will contain one item each, making the code go through one of the empty ifs, and eventually failing with the following error (as reported in the XML report): Two feature properties are required, but received 0]

@aaime aaime changed the title Failed assumptions in SpatialJoinTest.joinWithIntersects SpatialJoinTest.joinWithIntersects won't work unless there are two feature types with surface properties Nov 29, 2017
@lgoltz
Copy link
Contributor

lgoltz commented Dec 4, 2017

It is required to implement the empty ifs:

} else if (!this.surfaceProps.isEmpty() && !this.curveProps.isEmpty()) {
   // Surface propertry and curve prop
} else if (!this.surfaceProps.isEmpty() && !this.pointProps.isEmpty()) {
   // Surface propertry and point prop
} else if (this.curveProps.size() > 1) {
   // Two curve properties
}

@lgoltz
Copy link
Contributor

lgoltz commented Dec 13, 2017

@aaime Can you provide a service for testing?

@lgoltz
Copy link
Contributor

lgoltz commented Dec 13, 2017

Fixes with PR #92.

Tested with http://cloudsdi.geo-solutions.it/geoserver/sf/PrimitiveGeoFeature/ows?service=WFS&version=2.0.0&request=GetCapabilities

The test still fails with java.lang.AssertionError: Unexpected HTTP status code. expected <br><br>[200] but found <br><br>[400]:

Request:

<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" count="10" service="WFS"
                startIndex="0"
                version="2.0.0">
   <wfs:Query xmlns:ns71="http://cite.opengeospatial.org/gmlsf"
              typeNames="ns71:PrimitiveGeoFeature ns71:PrimitiveGeoFeature">
      <Filter xmlns="http://www.opengis.net/fes/2.0">
         <Intersects>
            <ValueReference>ns71:PrimitiveGeoFeature/ns71:surfaceProperty</ValueReference>
            <ValueReference>ns71:PrimitiveGeoFeature/ns71:curveProperty</ValueReference>
         </Intersects>
      </Filter>
   </wfs:Query>
</wfs:GetFeature>

Response:

<cnt:rest><ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1"
                     xmlns:xs="http://www.w3.org/2001/XMLSchema"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     version="2.0.0"
                     xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://cloudsdi.geo-solutions.it:80/geoserver/schemas/ows/1.1.0/owsAll.xsd">
  <ows:Exception exceptionCode="NoApplicableCode">
      <ows:ExceptionText>Extracted invalid join filter [ ns71:PrimitiveGeoFeature/ns71:surfaceProperty intersects ns71:PrimitiveGeoFeature/ns71:curveProperty ], it uses the unkonwn alias/typename ns71:PrimitiveGeoFeature</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport></cnt:rest>

@lgoltz
Copy link
Contributor

lgoltz commented Dec 13, 2017

Same query with aliases throws another exception (but I'm not sure if it is required to use aliases):
Request:

<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" count="10" service="WFS"
                startIndex="0"
                version="2.0.0">
   <wfs:Query xmlns:ns71="http://cite.opengeospatial.org/gmlsf"
              typeNames="ns71:PrimitiveGeoFeature ns71:PrimitiveGeoFeature" aliases="a b">
      <Filter xmlns="http://www.opengis.net/fes/2.0">
         <Intersects>
            <ValueReference>a/ns71:surfaceProperty</ValueReference>
            <ValueReference>b/ns71:curveProperty</ValueReference>
         </Intersects>
      </Filter>
   </wfs:Query>
</wfs:GetFeature>

Response:

<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://cloudsdi.geo-solutions.it:80/geoserver/schemas/ows/1.1.0/owsAll.xsd">
    <ows:Exception exceptionCode="NoApplicableCode">
        <ows:ExceptionText>
            java.lang.RuntimeException: Failed to get property: {http://www.opengis.net/wfs/2.0}boundedBy
Failed to get property: {http://www.opengis.net/wfs/2.0}boundedBy
java.io.IOExceptionorg.postgresql.util.PSQLException: ERROR: column a.ns71:surfaceProperty does not exist
  Position: 1015
ERROR: column a.ns71:surfaceProperty does not exist
  Position: 1015
        </ows:ExceptionText>
    </ows:Exception>
</ows:ExceptionReport>

@lgoltz
Copy link
Contributor

lgoltz commented Dec 13, 2017

@aaime Can you please check this and open a new issue if you think there is one more failure in the ETS?

@lgoltz lgoltz removed their assignment Dec 13, 2017
@aaime
Copy link
Contributor Author

aaime commented Jan 8, 2018

I'll have a look

@aaime
Copy link
Contributor Author

aaime commented Jan 8, 2018

Hi, what is the "procotol" for getting all the pull requests currently outstanding merged? Do you need me to check them one by one?

@dstenger dstenger added this to the 1.28 milestone Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants