Opened 12 years ago

Closed 5 years 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 12 years ago.
calibration fixes to r2 driver for gdal 1.8.1
ticket_4385.patch (2.0 KB ) - added by Even Rouault 12 years ago.
Patch against trunk r23569

Download all attachments as: .zip

Change History (6)

by aklein, 12 years ago

Attachment: rs2dataset.cpp added

calibration fixes to r2 driver for gdal 1.8.1

comment:1 by Even Rouault, 12 years ago

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.

by Even Rouault, 12 years ago

Attachment: ticket_4385.patch added

Patch against trunk r23569

comment:2 by pvachon, 12 years ago

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 by antonio, 11 years ago

Cc: antonio added

comment:4 by Even Rouault, 5 years ago

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.