Opened 8 years ago

Last modified 5 years ago

#3083 new enhancement

allow single band processing with i.landsat.toar

Reported by: mankoff Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Raster Version: unspecified
Keywords: Cc: mankoff@…
CPU: Unspecified Platform: Unspecified

Description

If i.landsat.toar could work with a single band, workflows could be 12x as efficient. Only 1 band could be downloaded, imported, and processed, saving time and disk space.

Attachments (1)

i.landsat.toar.diff (2.4 KB ) - added by mankoff 8 years ago.
Patch updated - all bands processed if band keyword not set.

Download all attachments as: .zip

Change History (13)

comment:1 by Nikos Alexandris, 8 years ago

Just tested. The patch deals with one-digit enumerated bands but it won't handle B61 and B62 (for Landsat 7). As well, it will break the "normal" functionality in which the module loops over all bands. And, finally, will it handle a "BQA" band (for Landsat 8 for example)?

Thanks for doing this!

comment:2 by Nikos Alexandris, 8 years ago

Sorry, to be precise, the patch handles one- and two-digit band numbers. For example 1 or 2 or 3 and 11 or 12 as well. But it won't handle 61 and 62 (Landsat 7).

comment:3 by mankoff, 8 years ago

I didn't intend to remove the standard functionality. That error is now fixed in the updated patch. Perhaps this should be considered a bad hack that works for L8 and not very well for L7, as opposed to a patch.

Last edited 8 years ago by mankoff (previous) (diff)

by mankoff, 8 years ago

Attachment: i.landsat.toar.diff added

Patch updated - all bands processed if band keyword not set.

comment:4 by martinl, 8 years ago

Milestone: 7.0.57.3.0

comment:5 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:6 by neteler, 7 years ago

Can anyone please review the attachment (...a few lines)? Thanks

in reply to:  6 comment:7 by mlennert, 7 years ago

Replying to neteler:

Can anyone please review the attachment (...a few lines)? Thanks

IIUC, the 'band' parameter takes the number of the band in the list of bands. This might not be intuitive for people, who when asked which band might say '61' (or '80' for those landsat images where bands are numbered with two digits). At least this would need very clear documentation both in the parameter description and the man page.

Also, I don't think this is explicit in our C submitting rules, but AFAIK, custom in GRASS has it that we do not use inline variable declarations. So the line

int i0, i1;

should come at the beginning with all the other declarations.

Other than that, I agree with Yann that this is a quite trivial patch.

I haven't tested, though.

comment:8 by neteler, 6 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:9 by neteler, 6 years ago

Milestone: 7.4.17.4.2

comment:10 by martinl, 6 years ago

Milestone: 7.4.27.6.0

All enhancement tickets should be assigned to 7.6 milestone.

comment:11 by martinl, 5 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:12 by martinl, 5 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.