Opened 9 years ago

Last modified 9 years ago

#1208 closed defect

WCPS2.0_Difference matrix values of bands calculation from WCPS 1.0 — at Version 6

Reported by: Bang Pham Huu Owned by:
Priority: major Milestone: 10.0
Component: petascope Version: development
Keywords: WCPS 2.0, matrix calculation, coverage bands Cc: Dimitar Misev, Alex Dumitru, Vlad Merticariu
Complexity: Medium

Description (last modified by Bang Pham Huu)

wcps test "04-vegetation_index.test.out" with WCPS query

for c in ( rgb ) return encode((unsigned char)
( ((c.0 / ((float)c.0 + c.1))-(c.1 / ((float)c.0 + c.1))) > 0.6 ) * 255, "png", "nodata=0" )

is translate in Rasql by WCPS 1.0

select encode((char)((((((((((c).0)/((float)((((c).0)+((c).1))))))-((((c).1)/((float)((((c).0)+((c).1))))))))>(0.6)))*(255))),
 "PNG", "nodata=0;xmin=0.0;xmax=399.0;ymin=0.0;ymax=343.0;crs=OGC:Index2D")
 from rgb AS c where oid(c)=45057

and Rasql by WCPS 2.0

SELECT encode((char)  
(  (  ( c.0 /  ( (float) c.0 + c.1 )  ) 
 -
  ( c.1 /  ( (float) c.0 + c.1 )  )  )  > 0.6 )  * 255,
 "png" , "nodata=0") FROM rgb AS c

the result is different, view here https://drive.google.com/a/fimo.edu.vn/folderview?id=0B_VL2-SVlKPHU1VMSi1iXzgzNTA&usp=drive_web (oracle is WCPS 1.0, output is WCPS 2.0)

due to the matrix calculation between coverage bands which is different between WCPS 1.0 and WCPS 2.0

Change History (6)

comment:1 by Dimitar Misev, 9 years ago

Did you make a mistake in copying the rasql queries? Because both queries seem to be exactly same, please check.

comment:2 by Bang Pham Huu, 9 years ago

Description: modified (diff)

Thanks Dimitar, I've posted wrong WCPS 2.0 Rasql query.

comment:3 by Dimitar Misev, 9 years ago

I'm still not sure what's the difference between the queries, can you point it out?

comment:4 by Bang Pham Huu, 9 years ago

Dimitar, view images in https://drive.google.com/a/fimo.edu.vn/folderview?id=0B_VL2-SVlKPHU1VMSi1iXzgzNTA&usp=drive_web you will see that WCPS 2.0 has more pixel has values than WCPS 1.0

comment:5 by Dimitar Misev, 9 years ago

No I mean the rasql queries, not the outputs. The WCPS 1 query doesn't seem like it came out of petascope?

Last edited 9 years ago by Dimitar Misev (previous) (diff)

comment:6 by Bang Pham Huu, 9 years ago

Description: modified (diff)

It is different in syntax while WCPS 1.0 has a lot of (((())) but I don't know about what do you mean?

Note: See TracTickets for help on using tickets.