Opened 8 years ago

Closed 8 years ago

#1258 closed defect (invalid)

WCPS1.5_Coverage constructor iterator should be convert correctly in geo-referenced axis

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 10.0
Component: petascope Version: development
Keywords: WCPS syntax, geo-referenced axis, time axis Cc: Peter Baumann, Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description

This problem in WCPS 1.0, in WCPS 1.5 it has error by parsing time. For example, eobstest has Lat axis from (-25:75.5) which is converted to (0:101) in grid axis.

WCPS query with emphasis in query value from c[Lat and Long]

for c in (eobstest) return encode(
      coverage DFT 
      over $xx x(25:75),$xy y(60:65) 
      values c[t(1), Lat($xy), Long($xx)], "csv")

which is converted to Rasql from WCPS 1.0

select csv(
       marray i_i in [25:75, 60:65] 
       values (c) [ 1, i_i[0] , i_i[1] ]) 
from eobstest AS c where oid(c)=1537

This is not correct as user want to query i.e Long(25:75) so coverage constructor iterator i_i need to convert to marray i_i in [0:100].


@Prof. Peter: I'd request to update WCPS syntax in coverageConstructorExpr as lo and hi in http://portal.opengeospatial.org/files/?artifact_id=32319 can be not integer.

It will be calculated in Petascope depend on the axis type (non-CRS, CRS, time) and return the integer coordinate in Rasql but in WCPS,it can be:

+ Integer interval: such as axis with non-CRS like mr (i, j). This will have the same iterator interval as Rasql. Example:

for c in (mr) return encode(
coverage DFT over $xx x(25:75),$xy y(60:65) 
values c[i($xy), j($xx)], "csv")

+ Float interval: such as axis with CRS like eobtest (Lat, Long). This will need to be calculated and different with Rasql. Example:

for c in (eobstest) return encode(
coverage DFT over $xx x(25.25756:75.25754),$xy y(60.567567:65.7567567)
values c[t(0), Lat($xy), Long($xx)], "csv")

+ String interval: such as time axis like eobstest (t). This will need to be calculated and also different with Rasql. Example:

for c in (eobstest) return encode(
coverage DFT over $xx x(25:75),$xy y(60:65), $xt("1960-08-02 00:00:00":"1970-06-03 00:00:00") 
values c[t($xt), Lat($xy), Long($xx)], "csv")


Change History (3)

comment:1 by Bang Pham Huu, 8 years ago

Maybe I've not thought about the other case such as

for c in (eobstest) return encode(
coverage DFT over $xx x(25.25756:75.25754),$xy y(60.567567:65.7567567)
values c[t(0), Lat($xy + $xx), Long($xx + $xy)], "csv")

As in here, it cannot calculate the correct domain for $xx and $yy as they are belonged to both Lat and Long axis. Hope someone can give me opinion.

comment:2 by Bang Pham Huu, 8 years ago

I think the correct way is instead of "$variableName Random_name" such as "$xx x", user should explicitly define what axis type they want to query in iterator by

over $xx Lat(25.25756:75.25754), $xy Long(60.567567:65.7567567)

so the WCPS query will be

for c in (eobstest) return encode(
coverage DFT over $xx Lat(25.25756:75.25754),$xy Long(60.567567:65.7567567)
values c[t(0), Lat($xy + $xx), Long($xx + $xy)], "csv")

which is translated to Rasql

select csv(
       marray i_i in [25:75, 60:65] 
       values (c) [ 1, i_i[0] + i_i[1] , i_i[1] + i_i[0] ]) 
from eobstest AS c where oid(c)=1537

then the problem will be solved correctly even in the exception case above #comment:1

comment:3 by Bang Pham Huu, 8 years ago

Resolution: invalid
Status: newclosed

WCPS 1.5 does not support this requested change, the purpose is making it works as same as WCPS 1.0, I will close ticket here.

Note: See TracTickets for help on using tickets.