#1208 closed defect (fixed)

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

Reported by: bphamhuu Owned by: bphamhuu
Priority: major Milestone: 10.0
Component: petascope Version: development
Keywords: WCPS 2.0, matrix calculation, coverage bands Cc: dmisev, mdumitru, vmerticariu
Complexity: Medium

Description (last modified by bphamhuu)

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 Changed 16 months ago by dmisev

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

comment:2 Changed 16 months ago by bphamhuu

  • Description modified (diff)

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

comment:3 Changed 16 months ago by dmisev

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

comment:4 Changed 16 months ago by bphamhuu

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 Changed 16 months ago by dmisev

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

Last edited 16 months ago by dmisev (previous) (diff)

comment:6 Changed 16 months ago by bphamhuu

  • 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 Changed 16 months ago by dmisev

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 Changed 16 months ago by dmisev

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 Changed 16 months ago by bphamhuu

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

comment:10 Changed 16 months ago by dmisev

No let's just update the correct oracle.

comment:11 follow-up: Changed 16 months ago by bphamhuu

  • Summary changed from WCPS2.0_Difference matrix values of bands calculation from WCPS 1.0 to WCPS2.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 Changed 16 months ago by vmerticariu

comment:13 in reply to: ↑ 11 ; follow-up: Changed 16 months ago by dmisev

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.

comment:14 in reply to: ↑ 13 Changed 16 months ago by dmisev

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 Changed 16 months ago by vmerticariu

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 Changed 16 months ago by dmisev

Ah right perfect.

comment:17 Changed 16 months ago by bphamhuu

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

comment:18 Changed 15 months ago by bphamhuu

  • Owner set to bphamhuu
  • Status changed from new to assigned

comment:19 Changed 15 months ago by bphamhuu

  • Resolution set to fixed
  • Status changed from assigned to closed

the patch was accepted, close ticket, thanks.

Note: See TracTickets for help on using tickets.