Opened 9 years ago

Closed 8 years ago

#1270 closed defect (fixed)

WCPS1.5 - Return single scalar value from slicing coverage without encoding

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 9.3
Component: petascope Version: development
Keywords: slicing coverage, encoding Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description

From http://rasdaman.org/ticket/1269, when return a single scalar value by slicing in each axis of coverage it should returns a 0D value, e.g:

for c in (mr) return c[i(0), j(0)]

will return 0. However, current WCPS 1.0 and WCPS 1.5 does not support this syntax

Error translating parsed abstract WCPS query to XML format.

and it forces to use

encode($coverage, "csv").

So if when check each dimension of coverage is slicing (e.g c[Lat(0), Long(20), t(1)]) then this is valid to get the 0D value,
e.g: 5 instead of

encode(c[Lat(0), Long(20), t(1)], "csv").

Change History (2)

comment:1 by Bang Pham Huu, 9 years ago

I merge this ticket with #372 as it has the same problem, so in this ticket need to allow Boolean and Binary scalar expression with slicing coverage also.

  1. Binary scalar expression
 for c in (mr) return c[i(0), j(0)] + 5 + avg(c)
  1. Boolean scalar expression (simple case)
     for c in (mr) return c[i(0), j(0)] = 0 
    
  1. Boolean scalar expression (complex case)
  for c in (mr) return (c[i(0), j(0)] + 20 - 50 + avg(c) + count(c > 20)) = 0 

comment:2 by Bang Pham Huu, 8 years ago

Milestone: 10.09.3
Resolution: fixed
Status: newclosed

all these cases are processed in the patch ticket 1188 for WCPS 1.5, close ticket.

Note: See TracTickets for help on using tickets.