Opened 17 months ago

Last modified 15 months ago

#2750 reopened defect

FIX - rasql OVERLAY returns incorrect results

Reported by: Bang Pham Huu Owned by: mrodionych@…
Priority: major Milestone: 10.2
Component: server Version: 10.2
Keywords: Cc:
Complexity: Medium

Description (last modified by Bang Pham Huu)

`Import the two coverages (provided by OGC CITE WMS 1.3.0 tests) in attachment:

  • Buildings: two small pink rectangles at the top right
  • MapNeatline: the dark-red rectangle which covers Buildings

then check the query (WMS from OGC CITE: layers=Buildings,MapNeatline, hence rasql Buildings OVERLAY MapNeatline):

rasql -q 'SELECT ENCODE( (  (  EXTEND ( scale( scale( scale( ( ( c0[0:894,0:814] ) ), [0:799, 0:399] )  [0:799, 0:399], [0:399, 0:199] ), [0:67, 0:61] ), [-230:169, -39:160] ) )  )    OVERLAY (  (  EXTEND ( scale( scale( scale( ( ( c1[0:894,0:814] ) ), [0:799, 0:320] )  [0:799, 61:259], [0:399, 0:199] ), [0:352, 0:199] ), [-23:376, 0:199] ) )  ) , "png", "{}") FROM Buildings AS c0, MapNeatline AS c1' --out file
  • The result is incorrect as Buildings layer doesn't show at all and it is hidden by MapNeatline layer.
    • It should show two pink rectangles on the MapNeatline.

Attachments (2)

rasql_community.png (2.6 KB ) - added by Bang Pham Huu 17 months ago.
temp_ingredients.zip (71.3 KB ) - added by Bang Pham Huu 15 months ago.

Download all attachments as: .zip

Change History (13)

by Bang Pham Huu, 17 months ago

Attachment: rasql_community.png added

comment:1 by Bang Pham Huu, 17 months ago

Description: modified (diff)
Owner: set to Dimitar Misev
Status: newassigned

comment:3 by Bang Pham Huu, 17 months ago

Description: modified (diff)
Status: assignedreopened

comment:4 by Bang Pham Huu, 17 months ago

Description: modified (diff)

comment:5 by Dimitar Misev, 16 months ago

Owner: changed from Dimitar Misev to mrodionych@…
Status: reopenedassigned

comment:6 by Dimitar Misev, 16 months ago

Owner: changed from mrodionych@… to Bang Pham Huu

The attached ingredients don't work, please fix them first.

by Bang Pham Huu, 15 months ago

Attachment: temp_ingredients.zip added

comment:7 by Bang Pham Huu, 15 months ago

Owner: changed from Bang Pham Huu to Dimitar Misev

comment:8 by Dimitar Misev, 15 months ago

Owner: changed from Dimitar Misev to mrodionych@…

comment:9 by Dimitar Misev, 15 months ago

Resolution: invalid
Status: assignedclosed

The query is wrong: it should be map overlay buildings - to put the buildings on top of map. But the query in this ticket is buildings overlay map.

comment:10 by Bang Pham Huu, 15 months ago

Resolution: invalid
Status: closedreopened

@Dimitar: this ticket is not wrong, you misunderstood about it.

comment:11 by Dimitar Misev, 15 months ago

Indeed the generated rasql is correct, I suspect scale or extend do not copy the null values - or some other issue.

comment:12 by Dimitar Misev, 15 months ago

The null values in the json files are 0 which is incorrect. These files have mostly "255 255 255 0" as value = null value. So the null set should be [255,0].

Unfortunately it doesn't seem to work well.

rasql -q 'select count_cells(c0 is null) from MapNeatline as c0' --out string

  Result element 1: { 0, 0, 0, 0 }

This should print some non-zero values. There's probably a bug in evaluating operations on composite arrays with null values.

Note: See TracTickets for help on using tickets.