Opened 2 years ago

Closed 2 years ago

#2648 closed defect (fixed)

FIX - WCPS has error when using scale with LET clause

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 10.1
Component: petascope Version: 10.0
Keywords: Cc:
Complexity: Medium

Description

For example, this query:

query = '''
for $c in (S2_L2A_32631_B08_10m),
    $d in (S2_L2A_32631_B04_10m)

let $cutOut := [ ansi( "2021-04-09" ), E( 670000:730000 ), N( 4990220:5015220 ) ]
return
  encode( (
    scale(
      (((float) $c - $d) / ((float) $c + $d)) [ $cutOut ] > 0.5,
      { E:"CRS:1"(0:700) } ) * 255
    )
  , "image/jpeg")
'''

it has problem with scale(... [ $cutOut ]) due to updating query tree which it shouldn't do.

Change History (1)

comment:1 by Bang Pham Huu, 2 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.