Opened 18 months ago
Closed 18 months ago
#2728 closed defect (fixed)
FIX - scale on 3D base coverage with pyramid returns wrong result if expression specified in LET clause
Reported by: | Bang Pham Huu | Owned by: | Bang Pham Huu |
---|---|---|---|
Priority: | critical | Milestone: | 10.2 |
Component: | petascope | Version: | 10.2 |
Keywords: | Cc: | Dimitar Misev | |
Complexity: | Hard |
Description (last modified by )
For example this WCPS query:
for $co in (air_quality_monitoring_data_co) let $sub := [ansi(153403), X(147522.21879115:351672.21879115004083), Y(2422004.7731021:2799154.7731021)], $bands := ( ($co[ $sub ] - min($co[ $sub ])) / (max($co[ $sub ]) - min($co[ $sub ])) ) * 255 return encode( scale( (unsigned char) ($bands), { X:"CRS:1"(0:600), Y:"CRS:1"(0:700) } ), "png" )
return wrong grid domains 0:3,0:600,0:700
SELECT encode((char) ( SCALE(c_0, [0:3,0:600,0:700]) ) , "png" , "{\"geoReference\":{\"crs\":\"EPSG:3826\",\"bbox\":{\"xmin\":147522.21879115,\"ymin\":2422004.7731021,\"xmax\":351672.21879115004083,\"ymax\":2799154.7731021}},\"nodata\":[-3.4028234663852886E38]}") FROM air_quality_monitoring_data_co_4 AS c_0
But without LET
clause, this works fine, e.g.
for $co in (air_quality_monitoring_data_co) return encode( scale( $co[ansi(153403), X(147522.21879115:351672.21879115004083), Y(2422004.7731021:2799154.7731021)] - min($co[ansi(153403), X(147522.21879115:351672.21879115004083), Y(2422004.7731021:2799154.7731021)]) , { X:"CRS:1"(0:20), Y:"CRS:1"(0:30) } ), "png" )
returns rasql query:
SELECT encode(SCALE(c_0[0,0:510,0:942] - min_cells(c_0[0,0:510,0:942]) , [0:20,0:30]), "png" , "{\"geoReference\":{\"crs\":\"EPSG:3826\",\"bbox\":{\"xmin\":147522.21879115,\"ymin\":2422004.7731020999733,\"xmax\":351672.2187911500274,\"ymax\":2799154.7731021}},\"nodata\":[-3.4028234663852886E38]}") FROM air_quality_monitoring_data_co_8 AS c_0
Change History (3)
comment:1 by , 18 months ago
Description: | modified (diff) |
---|---|
Summary: | FIX - scale on 3D base coverage with pyramid returns wrong result → FIX - scale on 3D base coverage with pyramid returns wrong result if expression specified in LET clause |
comment:2 by , 18 months ago
Complexity: | Medium → Hard |
---|---|
Component: | undecided → petascope |
comment:3 by , 18 months ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.