#1371 closed defect (fixed)

WCPS_Only attach the selected bands when encode in netCDF

Reported by: bphamhuu Owned by:
Priority: major Milestone: 9.3
Component: petascope Version: development
Keywords: Cc: dmisev, vmerticariu
Complexity: Medium

Description

The error from Olly (PML), he wanted to do a WCPS query with select 1 band

for c in (V2_monthly_cci_uncert_combined_test_renamed)
return
encode
( 
(c[ansi("1998-01-01T00:00:00+00:00"), Lat(0.1:0.2), Long(10.0:10.1)].chlor_a > 25 )
 * 
c[ansi("1998-01-01T00:00:00+00:00"), Lat(0.1:0.2), Long(10.0:10.1)].chlor_a, "netcdf"
)

error in Rasql from the query

Petascope Error: Error evaluating rasdaman query: 
'SELECT encode( ( c[4,2156:2156,4560:4562].0 > 25 ) * c[4,2156:2156,4560:4562].0, "netcdf" ,
 "{\"dimensions\":[\"Lat\",\"Long\"],\"variables\":{\"Lat\":{\"type\":\"double\",\"data\":[0.1],\"metadata\":{},\"name\":\"Lat\"},\"Long\":{\"type\":\"double\",\"data\":[10.0,10.0416666666667,10.0833333333334],\"metadata\":{},\"name\":\"Long\"},
\"chlor_a\":{\"type\":\"unsigned char\",\"metadata\":{\"units\":\"10^0\"},\"name\":\"chlor_a\"},\"chlor_a_log10_bias\":{\"type\":\"unsigned char\",\"metadata\":{\"units\":\"10^0\"},\"name\":\"chlor_a_log10_bias\"},\"chlor_a_log10_rmsd\":{\"type\":\"unsigned char\",\"metadata\":{\"units\":\"10^0\"},\"name\":\"chlor_a_log10_rmsd\"}},
\"metadata\":{\"Project\":\"Climate Change Initiative - European Space Agency\",\"Creator\":\"Plymouth Marine Laboratory\",\"Title\":\"ESA CCI Ocean Colour Product\"},
\"geoReference\":{\"crs\":\"EPSG:4326\",\"bbox\":{\"xmin\":10.0,\"ymin\":0.1,\"xmax\":10.1,\"ymax\":0.2}}}") FROM V2_monthly_cci_uncert_combined_test_renamed AS c

so in the attached metadata, it should only use 1 band (e.g: chlor_a) not combine all these other bands (chlor_a_log10_bias, chlor_a_log10_rmsd) as will has error when encode in netCDF.

another working example for irr_cube_2 (which has 2 bands) so it need to specific 2 bands correctly, not just 1 band

rasql -q 'select encode ( c, "netcdf", "{ \"dimensions\": [\"Lat\", \"Long\"], \"variables\": { \"Lat\": {
\"type\":\"double\",\"data\":[0.1],\"metadata\":{},\"name\":\"Lat\"}, \"Long\": { \"type\":\"double\",\"data\":[10.0,10.0416666666667,10.0833333333334],\"metadata\":{},\"name\":\"Long\" },
\"chlor_asdadasd\":{\"asdasda\":\"asdasdasd\"},
 \"asdasd\":{\"asdada\":\"123123\"} }
, \"metadata\": {\"Project\":\"Climate Change Initiative - European Space Agency\",\"Creator\":\"Plymouth Marine Laboratory\",\"Title\":\"ESA CCI Ocean Colour Product\"} ,\"geoReference\":{\"crs\":\"EPSG:4326\",\"bbox\":{\"xmin\":10.0,\"ymin\":0.1,\"xmax\":10.1,\"ymax\":0.2 }} }" ) from irr_cube_2 as c' --out file

Change History (1)

comment:1 Changed 12 months ago by dmisev

  • Resolution set to fixed
  • Status changed from new to closed

Should be closed I guess?

Note: See TracTickets for help on using tickets.