Opened 8 years ago

Closed 8 years ago

#1196 closed defect (fixed)

WCPS1.5_parser does not expect a metadata expression in the interval expression in WCPS

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 9.3
Component: petascope Version: development
Keywords: Cc: Dimitar Misev, Alex Dumitru
Complexity: Medium

Description (last modified by Dimitar Misev)

From Piero's comment in ticket:595#5 and Dimitar's request.

An other use case is, this time for the imageCrsDomain, is when we need to scale dimensions of a coverage by the domain of different coverages, like in the following case I want to scale d on spatial-only dimensions of c:

for c in (eobstest_1),
    d in (eobstest_2)
return encode(
  scale(d[Long(43:44), Lat(24:24.5)],
    {    t:"CRS:1"( imageCrsDomain(d[Long(43:44), Lat(24:24.5)], t   )),
      Long:"CRS:1"( imageCrsDomain(c[Long(43:44), Lat(24:24.5)], Long)),
       Lat:"CRS:1"( imageCrsDomain(c[Long(43:44), Lat(24:24.5)], Lat )) }),
"csv")

This is not possible yet, the parser does not expect a metadata expression in the interval expression, and complains about not finding a COLON indeed.

A coverage constructor example:

for c in (eobstest)
return encode(
  coverage scatterplot
  over $x x( imageCrsDomain(c[t("1950-01-01T12"), Long(43:44), Lat(24:24.5)], Long)),
       $y y( imageCrsDomain(c[t("1950-01-01T12"), Long(43:44), Lat(24:24.5)], Lat) ),
  values ...

Change History (4)

comment:1 by Dimitar Misev, 8 years ago

Description: modified (diff)

comment:2 by Bang Pham Huu, 8 years ago

Summary: parser does not expect a metadata expression in the interval expression in WCPSWCPS1.5_parser does not expect a metadata expression in the interval expression in WCPS

comment:3 by Bang Pham Huu, 8 years ago

Owner: set to Bang Pham Huu
Status: newassigned

The first query problem has been solved in WCPS 1.5 (WCPS 1.0 has error) when:

for c in (eobstest),d in (eobstest)
return encode(
   scale(d[Long(43:44), Lat(24:24.5)],
      { t:"CRS:1"( imageCrsDomain(d[Long(43:44), Lat(24:24.5)], t   )),
        Long:"CRS:1"( imageCrsDomain(c[Long(43:44), Lat(24:24.5)], Long)),
        Lat:"CRS:1"( imageCrsDomain(c[Long(43:44), Lat(24:24.5)], Lat )) }),"csv")

returns

{{387},{316}},{{400},{342}},{{393},{304}},{{614},{546}},{{624},{538}},{{610},{480}}

the second query problem:

for c in (eobstest)
return encode(
      coverage scatterplot 
      over $x x( imageCrsDomain(c[t("1950-01-01T12"), Long(43:44), Lat(24:24.5)], Long) ),
           $y y( imageCrsDomain(c[t("1950-01-01T12"), Long(43:44), Lat(24:24.5)], Lat) ) 
      values 1,"csv")

which returns in WCPS 1.0

{1,1},{1,1},{1,1}

but in WCPS 1.5 it returns an exception

petascope.wcps2.error.managed.processing.CoverageMetadataException :
Error in processing coverage metadata: Invalid cell domain element: Bounds may not be null..

comment:4 by Bang Pham Huu, 8 years ago

Milestone: 9.29.3
Resolution: fixed
Status: assignedclosed

The second error query in http://rasdaman.org/ticket/1196#comment:3 was fixed in the patch ticket 1188, close ticket here.

NOTE: we do not support now the interval in subset, e.g: Lat(imageCrsdomain(d, t)) as it cannot translate to the numeric as in current implementation.

Note: See TracTickets for help on using tickets.