Opened 3 years ago

Closed 3 years ago

#788 closed defect (fixed)

WCS scaling extension wrongly maps scale-factor to WCPS

Reported by: pcampalani Owned by: pcampalani
Priority: critical Milestone: 9.0.x
Component: petascope Version: development
Keywords: scale factor wcs Cc: gxinghua
Complexity: Medium


WCS scaling extensions makes a wrong mapping to WCPS query in case of scale factors, turning lo and hi bounds to lo/factor and hi/factor bounds, but this breaks when lo or hi are 0 since the



select csv(scale( c[0:7,203:210], [0:70,2030:2100] )) from mr AS c

but the index extent then is scaled from 8 to 71 cells, while it should go to 80 cells.

Change History (5)

comment:1 Changed 3 years ago by pcampalani

  • Cc gxinghua added; xinghua removed
  • Status changed from new to accepted

comment:2 Changed 3 years ago by pcampalani

Proper scaling is on the lo/hi extent: fix upcoming.

Last edited 3 years ago by pcampalani (previous) (diff)

comment:3 Changed 3 years ago by pcampalani

a note: this does not actually depend on the index values (0 or not).
The current implementation scales the single bounds but this does never work since the formula of the extent includes the +1 term:

EXTENT := (hi - lo) + 1 = W

              := [(hi - lo) + 1]/F = W/F
              := [(hi/F - lo/F) + 1/F]

whereas the current implementation yields an extent of [(hi/F - lo/F) + 1].

comment:4 Changed 3 years ago by pcampalani

Fixed in changeset:3763e65.

comment:5 Changed 3 years ago by pcampalani

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.