Opened 8 years ago
Closed 8 years ago
#1436 closed defect (fixed)
WCPS_Supports user defined band names in range constructor
Reported by: | Bang Pham Huu | Owned by: | Bang Pham Huu |
---|---|---|---|
Priority: | major | Milestone: | 9.4 |
Component: | petascope | Version: | development |
Keywords: | Cc: | Dimitar Misev, Vlad Merticariu | |
Complexity: | Medium |
Description (last modified by )
current WCPS checks band names strictly (i.e: if in range constructor has a non-existing band, it will throw exception). This is necesary as in netCDF, it can write in coverage metadata user defined band names and should be supported.
WCPS query example:
for c in ( test_rgb ) return encode( { blueTEST: c.red; redTEST: c.blue }.redTEST , "netcdf")
the output should have redTEST as band name in netCDF.
\"redTEST\":{ \"type\":\"unsigned char\",\"metadata\":{\"units\":\"10^0\"},\"name\":\"redTEST\"}
Furthermore, a range constructor with a single field should only translate the field expression to rasql, and not to a whole range constructor. E.g.
single field
WCPS: for c in (test_rgb) return {blue: c.red} rasql: select c.red from test_rgb as c
multi field
WCPS: for c in (test_rgb) return {blue: c.red; red: c.blue} rasql: select {c.red, c.blue} from test_rgb as c
Change History (5)
comment:1 by , 8 years ago
Description: | modified (diff) |
---|
comment:3 by , 8 years ago
Milestone: | 9.3 → 9.4 |
---|
comment:4 by , 8 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:5 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Note: comment moved to ticket #1437
There is a problem with choosing the metadata of the range, e.g:
it will need to get some metadata for redTEST (e.g: data type, metadata, units,…) not only the name. To do this, it need to consider from the above expression, which band name will be chosen to assign to redTEST (c.red or c.blue or c.green) ?
as c.red can have different metadata (e.g: c.red: unit: 10, data type: float, nilValues: 100)
current I think WCPS will take it from c.red as it is from leftmost one and it will be propagated from left to right (but still need to confirm!).
then it will write in netCDF as