Opened 3 years ago

Closed 15 months ago

#595 closed defect (fixed)

WCPS1.5_WCPS domain metadata expression inside interval

Reported by: pcampalani Owned by: bphamhuu
Priority: major Milestone: 10.0
Component: petascope Version: development
Keywords: domain interval Cc: pbaumann, vmerticariu, mdumitru
Complexity: Medium

Description (last modified by pcampalani)

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 Changed 3 years ago by pcampalani

  • Description modified (diff)

comment:2 Changed 3 years ago by pcampalani

  • Cc vmerticariu mdumitru added

comment:3 Changed 3 years ago by pbaumann

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 Changed 3 years ago by pcampalani

  • Priority changed from major to critical

comment:5 Changed 3 years ago by pcampalani

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 Changed 3 years ago by pbaumann

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 Changed 3 years ago by pcampalani

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 Changed 3 years ago by dmisev

  • Priority changed from critical to major

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 Changed 18 months ago by dmisev

  • Owner changed from pcampalani to mdumitru
  • Status changed from new to assigned

comment:10 Changed 16 months ago by bphamhuu

  • Cc mantovani@… removed
  • Milestone changed from Future to 10.0
  • Summary changed from WCPS domain metadata expression inside interval to WCPS1.5_WCPS domain metadata expression inside interval

comment:11 Changed 15 months ago by bphamhuu

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

the patch was accepted, close here, thanks.

comment:12 Changed 15 months ago by bphamhuu

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:13 Changed 15 months ago by bphamhuu

  • Owner changed from mdumitru to bphamhuu
  • Status changed from reopened to assigned

comment:14 Changed 15 months ago by bphamhuu

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

the patch was accepted, close here, thanks.

Note: See TracTickets for help on using tickets.