Opened 11 years ago

Closed 9 years ago

#595 closed defect (fixed)

WCPS1.5_WCPS domain metadata expression inside interval

Reported by: Piero Campalani Owned by: Bang Pham Huu
Priority: major Milestone: 10.0
Component: petascope Version: development
Keywords: domain interval Cc: Peter Baumann, Vlad Merticariu, Alex Dumitru
Complexity: Medium

Description (last modified by Piero Campalani)

domain expressions are not correctly mapped to RasQL queries.

WCPS grammar says:

dimensionIntervalExpr:
    scalarExpr : scalarExpr
  | _domain_ ( coverageName , axisName , crsName )

But then the output of the domain metadata expression is not translated to a proper subset in RasQL: it is pasted onto the query instead, causing error.

for c in (eobstest)
return encode(
  c[Lat( domain(c, Lat, "http://localhost:8090/def/crs/EPSG/0/4326") )]
, "csv")

WCPS Error: Could not evaluate rasdaman query: 'select csv((c) [*:*,*:*,(-40.5,75.5)]) from eobstest AS c' 

…is translated to:

--- select csv((c) [*:*,*:*,(-40.5,75.5)]) from eobstest AS c
+++ select csv((c) [*:*,*:*,0:231)])       from eobstest AS c

@Peter: regarding the WCPS standard: I believe imageCrsDomain( coverageExpr , axisName ) should be allowed as well, for WCPS 2.0 ?
So that:

dimensionIntervalExpr:
    scalarExpr : scalarExpr
  | _domain_ ( coverageName , axisName , crsName )
  | _imageCrsDomain_ ( coverageName , axisName )

Change History (14)

comment:1 by Piero Campalani, 11 years ago

Description: modified (diff)

comment:2 by Piero Campalani, 11 years ago

Cc: Vlad Merticariu Alex Dumitru added

comment:3 by Peter Baumann, 11 years ago

indeed! in WCPS 2 we will have the euqivalent to a DescribeCoverage request, so the full slate of WCS metadata will be delivered.

comment:4 by Piero Campalani, 11 years ago

Priority: majorcritical

comment:5 by Piero Campalani, 11 years ago

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.

comment:6 by Peter Baumann, 11 years ago

this will be possible with WCPS 2 (a lesson learnt): via XQuery, domain info can be extracted from a describeCoverage($c) and used for subsetting another coverage.

comment:7 by Piero Campalani, 11 years ago

Yes, I know (comment:3).
I wonder if the fix could be relatively quick & easy for the current implementation too, since in the end coverage constructors accept single-dimension imageCrsDomain expression:

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 ...

(raising to critical for upcoming WW Europa Challenge)

comment:8 by Dimitar Misev, 10 years ago

Priority: criticalmajor

For scaling it should be possible, see comment:14:ticket:387

I don't think this should be critical, especially with a Future milestone.

comment:9 by Dimitar Misev, 9 years ago

Owner: changed from Piero Campalani to Alex Dumitru
Status: newassigned

comment:10 by Bang Pham Huu, 9 years ago

Cc: mantovani@… removed
Milestone: Future10.0
Summary: WCPS domain metadata expression inside intervalWCPS1.5_WCPS domain metadata expression inside interval

comment:11 by Bang Pham Huu, 9 years ago

Resolution: fixed
Status: assignedclosed

the patch was accepted, close here, thanks.

comment:12 by Bang Pham Huu, 9 years ago

Resolution: fixed
Status: closedreopened

comment:13 by Bang Pham Huu, 9 years ago

Owner: changed from Alex Dumitru to Bang Pham Huu
Status: reopenedassigned

comment:14 by Bang Pham Huu, 9 years ago

Resolution: fixed
Status: assignedclosed

the patch was accepted, close here, thanks.

Note: See TracTickets for help on using tickets.