Opened 6 years ago

Closed 6 years ago

#1776 closed defect (fixed)

Rasql_Overlay 2 collections with different bands error

Reported by: Bang Pham Huu Owned by: bbell
Priority: major Milestone: 9.7
Component: rasserver Version: development
Keywords: Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description

collection test_waxlake has 3 bands

rasql -q 'select dbinfo(c) from test_waxlake as c' --out string
rasql: rasdaman query tool v1.0, rasdaman 9.6.0.
Opening database RASBASE at localhost:7001... ok.
Executing retrieval query... ok.
Query result collection has 1 element(s):
  Result object 1: {
 "oid": "940033",
 "baseType": "marray <struct { char red, char green, char blue }, 2>",
 "tileNo": "6",
 "totalSize": "691200",
 "tiling": {
	"tilingScheme": "aligned",
	"tileSize": "4194304",
	"tileConfiguration": "[0:*,0:*]"
 },
 "index": {
	"type": "rpt_index",
	"PCTmax": "4096",
	"PCTmin": "2048"
 }
}

collection test_mean_summer_airtemp has 1 band.

rasql -q 'select dbinfo(c) from test_mean_summer_airtemp as c' --out string
rasql: rasdaman query tool v1.0, rasdaman 9.6.0.
Opening database RASBASE at localhost:7001... ok.
Executing retrieval query... ok.
Query result collection has 1 element(s):
  Result object 1: {
 "oid": "908289",
 "baseType": "marray <char, 2>",
 "tileNo": "3",
 "totalSize": "629946",
 "tiling": {
	"tilingScheme": "aligned",
	"tileSize": "4194304",
	"tileConfiguration": "[0:500,0:500]"
 },
 "index": {
	"type": "rpt_index",
	"PCTmax": "4096",
	"PCTmin": "2048"
 }
}
rasql done.

This query with "+" operator without error, output is a 3 bands collection.

rasql -q 'select encode(d[0:20,0:20] + c[0:20,0:20], "tiff") from test_waxlake as c, test_mean_summer_airtemp as d'

gdalinfo rasql_1.tif 
Driver: GTiff/GeoTIFF
Files: rasql_1.tif
Size is 21, 21
Coordinate System is `'
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,   21.0)
Upper Right (   21.0,    0.0)
Lower Right (   21.0,   21.0)
Center      (   10.5,   10.5)
Band 1 Block=21x21 Type=Byte, ColorInterp=Red
Band 2 Block=21x21 Type=Byte, ColorInterp=Green
Band 3 Block=21x21 Type=Byte, ColorInterp=Blue

However, this query with "OVERLAY" returns error:

rasql -q 'select encode(c[0:20,0:20] overlay d[0:20,0:20], "tiff")
 from test_waxlake as c, test_mean_summer_airtemp as d' --out file
rasql: rasdaman query tool v1.0, rasdaman 9.6.0.
Opening database RASBASE at localhost:7001... ok.
Executing retrieval query... 
rasdaman error 363: Execution error 363 in line 1, column 28, near token overlay:
Cell base types of binary induce operation are incompatible.

Change History (2)

comment:1 by Dimitar Misev, 6 years ago

patch submitted

comment:2 by Dimitar Misev, 6 years ago

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