Opened 8 years ago

Last modified 8 years ago

#1333 closed defect

WCPS1.5_Set CRS for Axis iterator correctly — at Version 1

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

Description (last modified by Bang Pham Huu)

in processAxisIterator of CrsSubsetComputer class, currently it has a handle like this

//HACK: If the axis name given to the iterator id different than any of the axes name of the coverage, then set
//it to one of the axis names of the coverage (of the same index, or, if the index is too large, the first one)

List<DomainElement> axes = coverage.getCoverageInfo().getDomains();
List<String> axesNames = new ArrayList<String>(axes.size());

However, this will have bad effect when using axis iterator without existing axis name (long, lat) like in 84-minmax.test

for c in (mean_summer_airtemp)
  return 
        (condense min
        over     $py y (300:301)
        using    c[Long:"CRS:1"(100), Lat:"CRS:1"($py)])
        +
        (condense max
        over     $py y (300:301)
        using    c[Long:"CRS:1"(100), Lat:"CRS:1"($py)])

and it assumes that axis iterator $py will have CRS is "Long" from the above assumption.

then throw exception

petascope.wcps2.error.managed.processing.OutOfBoundsSubsettingException :
 Invalid subsetting: (303:305) is not within coverage's domain 
(111.975:156.275) for axis Long.

So for the purpose of making WCPS 1.5 as same as WCPS 1.0, we should set default CRS for axis iterator is CRS:1.

Same problem with 101-max_delta_px_history.test (assume t (1:3) is 32633 CRS)

for c in (irr_cube_2) return encode (
   coverage max_delta_pixel_history
   over     $t t ( 1 : 3 )
   values   max((c[E(100000:110000), N(5100000:5110000), ansi:"CRS:1"($t)]).b1 -
                (c[E(100000:110000), N(5100000:5110000), ansi:"CRS:1"($t - 1)]).b2)
, "csv")

Change History (1)

comment:1 by Bang Pham Huu, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.