Opened 6 years ago
Closed 6 years ago
#1866 closed defect (fixed)
WCPS request should enforce encode()
Reported by: | Peter Baumann | Owned by: | Bang Pham Huu |
---|---|---|---|
Priority: | major | Milestone: | 9.7 |
Component: | petascope | Version: | development |
Keywords: | Cc: | Vlad Merticariu, Dimitar Misev | |
Complexity: | Medium |
Description
A user reports that the following query:
for c in (Sentinel2) return coverage ndvi over $px N(0:*), $py E(0:*), $pt ansi(0:*) values (float) ((c[E($px),N($py),ansi($pt)].B08 - c[E($px),N($py),ansi($pt)].B02) / (c[E($px),N($py),ansi($pt)].B08 + c[E($px),N($py),ansi($pt)].B02))
returns this error message: "Invalid format number in interval (0,0)".
Actually missing is the encode() call in the first place.
The parser should return a syntax error, as per WCPS standard, in such a case. And a test case should be added to systemtest.
Change History (6)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Relevant standard clause:
7.1.2 processingExpr
The processingExpr element is either a encodedCoverageExpr (which evaluates to an encoded coverage; see Subclause 7.1.4), or a storeCoverageExpr (see Subclause 7.1.3), or a scalarExpr (which evaluates to coverage description data or coverage summary data; see Subclause 7.1.5).
follow-up: 4 comment:3 by , 6 years ago
it is still a valid query without any error.
not according to the standard it seems.
comment:4 by , 6 years ago
Replying to dmisev:
it is still a valid query without any error.
not according to the standard it seems.
or this one? why even it needs encode()?
for c in (lena) return avg(c)
comment:6 by , 6 years ago
Complexity: | Easy → Medium |
---|---|
Milestone: | → 9.7 |
Resolution: | → fixed |
Status: | new → closed |
@Peter: what about:
it is still a valid query without any error.