Opened 11 years ago

Closed 11 years ago

#475 closed defect (fixed)

Coverage iterator over double/date intervals

Reported by: Dimitar Misev Owned by: Dimitar Misev
Priority: major Milestone: 9.0
Component: petascope Version: development
Keywords: Cc: Piero Campalani, Dirk Daems, Peter Baumann
Complexity: Medium

Description

It would be very useful if the coverage iterator in a coverage constructor can iterate over double and date intervals, so that we can iterate over geo and time coordinates. This should be possible to implement fairly easily. E.g.

for c in (Cov)
return
  coverage newcov
  over px x(15.5:93.432)
       pt t(2013-09-10:2013-09-25)
  values ...

Change History (3)

comment:1 by Dimitar Misev, 11 years ago

Cc: Piero Campalani Dirk Daems Peter Baumann added
Owner: changed from abeccati to Dimitar Misev
Status: newaccepted

Ok I take back the "fairly easy" remark.

It would be fairly easy if the over clause was bound to an existing coverage, otherwise it would be necessary to provide a resolution parameter as well for the iterator, and a CRS.

So something like this (0.5 is resolution)

  over px x:"../EPSG/0/4326"(15.5:93.432, 0.5)
       pt t...

but then there is the issue of translating that to rasql and relating it to coverages in the values clause..


All in all, quite complicated. I think for most purposes it would suffice to allow imageCrsDomain in the over, which would provide the binding to an existing coverage, i.e. something like

  over px x(imageCrsDomain(c[x(15.5:93.432)])
       pt t...

much like we made it possible to use imageCrsDomain in scale (cf. #387)

Thoughts?

comment:2 by Dimitar Misev, 11 years ago

I submitted patch to allow imageCrsDomain. An example test case in the systemtest is:

for c in (eobstest)
return encode(
  coverage newcov
  over $px x(imageCrsDomain(c[Lat(25:35)], Lat)),
       $pt t(imageCrsDomain(c, t))
  values avg(c[Lat($px),t($pt)])
, "csv")

comment:3 by Dimitar Misev, 11 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.