Opened 9 years ago

Closed 9 years ago

#1208 closed defect (fixed)

WCPS1.5_Difference matrix values of bands calculation from WCPS 1.0 (Need to update oracle test)

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
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 (19)

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.

Version 0, edited 9 years ago by Dimitar Misev (next)

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?

comment:7 by Dimitar Misev, 9 years ago

Is this exactly the query that petascope sent to rasdaman:

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

comment:8 by Dimitar Misev, 9 years ago

Ok in this case WCPS 2 translates correctly, as WCPS 1 messes up something with the parentheses (there should be no parentheses in the bold part):

  • select encode((char)(((((( c.0/((float)(c.0+c.1))))-((c.1/((float)((c.0+c.1)))))))>0.6))*255
  • SELECT encode((char)( ( (c.0/((float)c.0+c.1) ) - (c.1/((float) c.0+c.1))) >0.6) *255

comment:9 by Bang Pham Huu, 9 years ago

Supper, then someone need to fix in WCPS1.0 ? or let it there.

comment:10 by Dimitar Misev, 9 years ago

No let's just update the correct oracle.

comment:11 by Bang Pham Huu, 9 years ago

Summary: WCPS2.0_Difference matrix values of bands calculation from WCPS 1.0WCPS2.0_Difference matrix values of bands calculation from WCPS 1.0 (Need to update oracle test)

but have to wait until WCPS 2.0 is available or system test will fail with WCPS 1.0, then the ticket here is just update oracle for case "04-vegetation_index.test.out"

comment:12 by Vlad Merticariu, 9 years ago

in reply to:  11 ; comment:13 by Dimitar Misev, 9 years ago

Replying to bphamhuu:

but have to wait until WCPS 2.0 is available or system test will fail with WCPS 1.0, then the ticket here is just update oracle for case "04-vegetation_index.test.out"

I think it would be best if you make a single patch switching to WCPS 2 in the systemtest and fixing all these tickets.

in reply to:  13 comment:14 by Dimitar Misev, 9 years ago

Replying to dmisev:

I think it would be best if you make a single patch switching to WCPS 2 in the systemtest and fixing all these tickets.

Actually I think this is not such a good idea :)

How about temporarily adding an option to the test.sh script, to enable switching to the new WCPS in the systemtest, e.g. ./test.sh --wcps=1.5? Then each ticket can be fixed one by one, and the oracle updates can be done last at the end.

comment:15 by Vlad Merticariu, 9 years ago

Bang is working on a different branch anyway, so on that branch he could enable systemtests to use wcps 1.5 and then fix 1 ticket at a time (1 fix = 1 patch).

comment:16 by Dimitar Misev, 9 years ago

Ah right perfect.

comment:17 by Bang Pham Huu, 9 years ago

Summary: WCPS2.0_Difference matrix values of bands calculation from WCPS 1.0 (Need to update oracle test)WCPS1.5_Difference matrix values of bands calculation from WCPS 1.0 (Need to update oracle test)

comment:18 by Bang Pham Huu, 9 years ago

Owner: set to Bang Pham Huu
Status: newassigned

comment:19 by Bang Pham Huu, 9 years ago

Resolution: fixed
Status: assignedclosed

the patch was accepted, close ticket, thanks.

Note: See TracTickets for help on using tickets.