Opened 11 years ago

Closed 11 years ago

#470 closed defect (fixed)

support asterisk in trim operation

Reported by: Jinsongdi Yu Owned by: Piero Campalani
Priority: major Milestone: 9.0
Component: petascope Version: 8.5
Keywords: asterisk subset Cc: Alex Dumitru, mantovani@…
Complexity: Medium

Description (last modified by Jinsongdi Yu)

According to wcs kvp req8
Query: http://kahlua.eecs.jacobs-university.de:8080/wcs-conformance-testing?service=WCS&VERSION=2.0.1&request=GetCoverage&coverageid=mean_summer_airtemp&subset=x(111.975,*)&subset=y(-44.525,*)
shall not return an exception

The log tells :
java.lang.NumberFormatException: For input string: '*'
may be the error happens when * is converted to numeric number

support * in subset
if(stringLo.equals("*")){

stringLo= low;

}
if(stringHi.equals("*")){

stringHi= low;

}


Change History (15)

comment:1 by Jinsongdi Yu, 11 years ago

Description: modified (diff)
Owner: changed from Jinsongdi Yu to Piero Campalani
Status: newassigned

comment:2 by Dimitar Misev, 11 years ago

A comparable request with the new petascope is:

http://localhost:8080/petascope?service=WCS&VERSION=2.0.1&request=GetCoverage&coverageid=mean_summer_airtemp&subset=Long%28111.975,*%29&subset=Lat%28-44.525,*%29

Output:

<ows:ExceptionReport version="2.0.0" 
    xsd:schemaLocation="http://www.opengis.net/ows/2.0 http://schemas.opengis.net/ows/2.0/owsExceptionReport.xsd"
    xmlns:ows="http://www.opengis.net/ows/2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
    <ows:Exception exceptionCode="InvalidRequest">
        <ows:ExceptionText>Error while casting a subset to numeric format for comparison: For input string: "*"</ows:ExceptionText>
    </ows:Exception>

</ows:ExceptionReport>

comment:3 by Piero Campalani, 11 years ago

Ok I didn't know about this WCS req. and the CITE testsuite does not include it I guess, since all the KVPs passed..
I see the first test is for reqs 1 to 9:

Assertion: req1-9:For all coverages offered by the server under test, test coverage
structure, service parameters, and service metatada via GetKVP GetCapabilities, 
DescribeCoverage and GetCoverage operations. Verify the responses contain the required information.

But it runs only DescribeCoverage and GetCapabilities requests.

comment:4 by Piero Campalani, 11 years ago

Milestone: 9.0

comment:5 by Piero Campalani, 11 years ago

Keywords: asterisk subset added

comment:6 by Piero Campalani, 11 years ago

Not sure about how to enable this.

Starting at WCPS, should the asterisk be incorporated as:

  • a numericScalarExpr
  • a stringScalarExpr
  • a new kind of ScalarExpr?

The first and third case are preferred, otherwise the asterisk would need to be "quoted" in the request.

How is this handled in RasQL?

comment:7 by Dimitar Misev, 11 years ago

In rasql the asterisk is recognized, e.g.

select c[*:*,*:*] from mr as c

is equivalent to

select c from mr as c

I think the best way is to enable this in WCPS, e.g.

for c in (mr)
return
  avg(c[i(50:*)])

and then translating it from WCS to WCPS will be trivial.

comment:8 by Piero Campalani, 11 years ago

Yes, I was starting with the assumption to start enabling the WCPS, but the issue is.. see comment:6 :)

comment:9 by Dimitar Misev, 11 years ago

I think I'd adapt numericScalarExpr, or introduce something like wildcardScalarExpr. The first is probably easier

comment:10 by Piero Campalani, 11 years ago

Fixed for WCS KVP and WCPS in changeset:5b93ab3.
Keep this open while fix for WCS XML/SOAP/REST is applied.

comment:11 by Piero Campalani, 11 years ago

Cc: Alex Dumitru added
Resolution: fixed
Status: assignedclosed

XML fixed in changeset:cde6ccf.
REST missing, but this ticket can be superseded by #554 as asterisk operations are in the systemtests.

comment:12 by Piero Campalani, 11 years ago

Cc: mantovani@… added

Asterisk currently works only with numerical subsettings, whereas it breaks if timestamps are used in trimming: re-opening the ticket.

for c in (eobstest)
return encode(
   c[Lat(0), Long(51), t(*:"1950-01-03")]
, "csv")

TODO : fix, and add test.

comment:13 by Piero Campalani, 11 years ago

Resolution: fixed
Status: closedreopened

Reopen since this currently works when numeric coordinates are in the other end of the subset with asterisk.

comment:14 by Piero Campalani, 11 years ago

Status: reopenedaccepted

comment:15 by Piero Campalani, 11 years ago

Resolution: fixed
Status: acceptedclosed

Asterisks now also work in association with ISO8601 time subsets (changeset:61fe75e).

Note: See TracTickets for help on using tickets.