#1262 closed defect (fixed)

WCPS1.0_Missing operator '+' in request from Petascope console

Reported by: bphamhuu Owned by: bphamhuu
Priority: major Milestone: 9.2
Component: petascope Version: development
Keywords: missing "+", operator "+", petascope console Cc: dmisev, vmerticariu
Complexity: Medium

Description

From a request on group https://groups.google.com/forum/#!topic/rasdaman-users/xA6nlD2M-sA

for c in (Timeseries)
return encode (    
(( ( c[ansi("2016-01-01")]).red - ( c[ansi("2016-01-01")]).nir)  
/ 
 (  ( c[ansi("2016-01-01")]).red + ( c[ansi("2016-01-01")]).nir  ))

this can work correctly if request directly from WCPS URL

localhost:8080/rasdaman/ows?service=WCS&version=2.0.1&request=ProcessCoverages&query=for c in (Timeseries)return encode ((( ( c[ansi("2016-01-01")]).red - ( c[ansi("2016-01-01")]).nir)  /  (  ( c[ansi("2016-01-01")]).red + ( c[ansi("2016-01-01")]).nir  )),  "png")

but not if request from Petascope's console.

due to in parsing from Petascope's console, it missed the '+' in request.

for c in (Timeseries)return encode ((

( ( c[ansi("2016-01-01")]).red - ( c[ansi("2016-01-01")]).nir)  

/ 
 (  ( c[ansi("2016-01-01")]).red  *MISSING*  ( c[ansi("2016-01-01")]).nir  )),  
"png")

and throw an exception

 TRACE [14:06:57] RasUtil@286: Parsing abstract WCPS query...
line 1:40 no viable alternative at input '('
 TRACE [14:06:57] StringScalarExpr@41: StringScalarExpr 2016-01-01
line 1:99 mismatched input ')' expecting COMMA
 TRACE [14:06:57] RasUtil@295: Converting parsed request to XML...
 ERROR [14:06:57] PetascopeInterface@467: Runtime error : Error translating parsed abstract WCPS query to XML format.
 ERROR [14:06:57] PetascopeInterface@513: Error stack trace:

It works also with WCPS1.5 in WCPS Request by URL, need to check the result from Petascope's console with WCPS1.5 also.

Change History (1)

comment:1 Changed 17 months ago by bphamhuu

  • Resolution set to fixed
  • Status changed from new to closed

Patch was accepted, close ticket.

Note: See TracTickets for help on using tickets.