Opened 11 years ago

Closed 10 years ago

#773 closed defect (fixed)

WCPS scale operation not to ignore single-cell trimmings

Reported by: Piero Campalani Owned by: Piero Campalani
Priority: major Milestone: 9.0.x
Component: petascope Version: development
Keywords: scale narrow trim Cc:
Complexity: Hard

Description

The WCPS scaling operator skips every dimension where the cell domain elements' extremes coincide, as a method to recognize slicings, which are correctly supposed to be left out.

However it can happen that a narrow trim selects a single cell anyway, but for integrity of coverage dimensionality, that dimension must not be left out.

for c in (eobstest)
return encode(
  scale(
     d[t("1950-01-01"), Long(43:44), Lat(24:24)],
     imageCrsDomain(c[t("1950-01-01T01"), Long(43:44), Lat(24:24)]))
"csv")

Becomes a RasQL :

    select csv(scale( c[0,36:38,103:103], [36:38] )) 
    from eobstest AS c 

It should translate instead to:

    select csv(scale( c[0,36:38,103:103], [36:38,103:103] )) 
    from eobstest AS c 

Change History (3)

comment:1 by Piero Campalani, 11 years ago

Note that CoverageExpr has a slicedAxis() method.

comment:2 by Piero Campalani, 10 years ago

Status: newaccepted

comment:3 by Piero Campalani, 10 years ago

Resolution: fixed
Status: acceptedclosed

Fixed in changeset:d824c6d: now slices are correctly identified by WCPS expression type (not by cell-domain subset extension).

Note: See TracTickets for help on using tickets.