Opened 17 years ago
Closed 17 years ago
#2294 closed defect (fixed)
Raster query band values wrong when multiple pixel result set
Reported by: | drewsimpson | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 5.0 release |
Component: | GDAL Support | Version: | 4.10 |
Severity: | normal | Keywords: | raster query |
Cc: |
Description
Unbuffered point queries work fine, but buffered point, rectangle and shape raster queries seem to transpose some of the numbers.
Attachments (1)
Change History (3)
by , 17 years ago
Attachment: | rq_test.pl added |
---|
comment:1 by , 17 years ago
Component: | MapServer C Library → GDAL Support |
---|---|
Keywords: | raster query added |
Milestone: | → 5.0 release |
Owner: | changed from | to
Priority: | high → normal |
Severity: | major → normal |
I have the associated tiff file, and have reproduced the problem. I'll take it and dig in.
warmerda@amd64[35]% perl rq_test.pl ------------------------------------------------------------ Query by point 429960.850000 3109004.900000 99 150 111 <--- ------------------------------------------------------------ Query by rectangle 429960.850000 3109004.900000 99 94 150 <--- 429961.150000 3109004.900000 142 111 100 ------------------------------------------------------------ Query by shape 429960.850000 3109004.900000 99 94 150 <--- 429961.150000 3109004.900000 142 111 100
The issue seems to be that the raster values for red, green and blue are getting mixed up. note that we get "99 150 111" for the point query, and "99 94 150" for the same location for rectnagle and shape queries.
comment:2 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I made the mistaken assumption that multiband RasterIO() results defaulted to pixel interleaving but they actually default to band interleaving. I have corrected this in trunk (r6847) which will hopefully go into 5.0.0rc2 next week.
In the meantime 4.10 and earlier raster query is broken for multi-band queries now, and will remain so. It does not affect single point requests.
This is in no way specific to perl mapscript.
Perl mapscript to reproduce issue