| 24 | |
| 25 | But without `LET` clause, this works fine, e.g. |
| 26 | |
| 27 | |
| 28 | {{{ |
| 29 | for $co in (air_quality_monitoring_data_co) |
| 30 | |
| 31 | return encode( |
| 32 | scale( $co[ansi(153403), X(147522.21879115:351672.21879115004083), Y(2422004.7731021:2799154.7731021)] |
| 33 | - min($co[ansi(153403), X(147522.21879115:351672.21879115004083), Y(2422004.7731021:2799154.7731021)]) |
| 34 | , { |
| 35 | X:"CRS:1"(0:20), Y:"CRS:1"(0:30) |
| 36 | } ), |
| 37 | "png" |
| 38 | ) |
| 39 | }}} |
| 40 | |
| 41 | returns rasql query: |
| 42 | |
| 43 | {{{ |
| 44 | 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 |
| 45 | }}} |