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)

rq_test.pl (3.4 KB ) - added by drewsimpson 17 years ago.
Perl mapscript to reproduce issue

Download all attachments as: .zip

Change History (3)

by drewsimpson, 17 years ago

Attachment: rq_test.pl added

Perl mapscript to reproduce issue

comment:1 by warmerdam, 17 years ago

Component: MapServer C LibraryGDAL Support
Keywords: raster query added
Milestone: 5.0 release
Owner: changed from sdlime to warmerdam
Priority: highnormal
Severity: majornormal

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 warmerdam, 17 years ago

Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.