Opened 8 years ago

Closed 9 months ago

#4385 closed defect (wontfix)

[PATCH] Radarsat-2 subdataset calibration not applied correctly

Reported by: aklein Owned by: pvachon
Priority: normal Milestone: closed_because_of_github_migration
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:
Cc: pvachon, antonio

Description

In RS2CalibRasterBand::IReadBlock, the look up table index is calculated using block offset instead of pixel offset. Additionally, the scanline length for reading byte data is incorrect. Updated code attached.

Attachments (2)

rs2dataset.cpp (55.8 KB) - added by aklein 8 years ago.
calibration fixes to r2 driver for gdal 1.8.1
ticket_4385.patch (2.0 KB) - added by Even Rouault 8 years ago.
Patch against trunk r23569

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by aklein

Attachment: rs2dataset.cpp added

calibration fixes to r2 driver for gdal 1.8.1

comment:1 Changed 8 years ago by Even Rouault

Cc: pvachon added
Summary: Radarsat-2 subdataset calibration not applied correctly[PATCH] Radarsat-2 subdataset calibration not applied correctly

Hum, from my non-specialist eye, it looks reasonable, but unfortunately I have no test data to check the correctness of the patch, so I'm a bit hesitant to apply. Maybe Frank or Phil will be willing to have a look at this (I've attached the patch updated against trunk)

I have a few observations however :

  • the patch assumes that the width of the raster is a multiple of the block width. Perhaps there should be some provision if the last block (at the right) is partial (like it is done for the y direction)
  • there's no test to check if the number of elements of m_nfTable is the same as nRasterXSize, which according to this patch must be the case, otherwise bad things will happen.

Changed 8 years ago by Even Rouault

Attachment: ticket_4385.patch added

Patch against trunk r23569

comment:2 Changed 8 years ago by pvachon

Owner: changed from warmerdam to pvachon
Status: newassigned

The patch looks OK, but give me a day to review this (I'll probably look at it tonight) -- I think there might need to be a bit more "love" given to this code at a glance.

P.

comment:3 Changed 7 years ago by antonio

Cc: antonio added

comment:4 Changed 9 months ago by Even Rouault

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: assignedclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub?. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.