Opened 2 years ago

Closed 2 years ago

#2619 closed defect (fixed)

WCPS - FIX - some scaling errors 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

e.g.

for $c in (S2_L2A_32632_B08_10m_Germany),
    $d in (S2_L2A_32632_B04_10m_Germany),
    $e in (EU_DEM)
let $sub := [ E(620869.956459:646110.098867),
              N(5969461.72991:5989912.8143),
              ansi("2021-06-18") ],
    $dem_sub := [ Lon(10.8378635446:11.2311422298),
                  Lat(53.8595559404:54.0367432026) ],
    $scale_c := scale($c [ $sub ], { E:"CRS:1"(1:900), N:"CRS:1"(1:600) }),
    $scale_d := scale($d [ $sub], { E:"CRS:1"(1:900), N:"CRS:1"(1:600) }),
    $scale_e := scale($e [ $dem_sub ], { Lon:"CRS:1"(1:900), Lat:"CRS:1"(1:600) })
return
  encode(
    crsTransform(
      {
        red:   (unsigned char) ( $scale_c / 20.5 );
        green: (unsigned char) (  $scale_d / 18 );
        blue:  (unsigned char) ( $scale_e / 15 ) 
      },
      {  
        E: "https://ows.rasdaman.org/def/crs/EPSG/0/4326",	
        N: "https://ows.rasdaman.org/def/crs/EPSG/0/4326"
      }
    )     
  , "png", "nodata=0")


return error

Coverage is 0D, cannot apply 'scale' operator on it.

Change History (1)

comment:1 by Bang Pham Huu, 2 years ago

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