[GRASS-dev] [GRASS GIS] #3083: allow single band processing with i.landsat.toar

#3083: allow single band processing with i.landsat.toar
-------------------------+-------------------------
Reporter: mankoff | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.5
Component: Raster | Version: unspecified
Keywords: | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
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.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3083&gt;
GRASS GIS <https://grass.osgeo.org>

#3083: allow single band processing with i.landsat.toar
--------------------------+-------------------------
  Reporter: mankoff | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Raster | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by nikosa):

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!

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3083#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3083: allow single band processing with i.landsat.toar
--------------------------+-------------------------
  Reporter: mankoff | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Raster | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by nikosa):

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).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3083#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3083: allow single band processing with i.landsat.toar
--------------------------+-------------------------
  Reporter: mankoff | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Raster | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by mankoff):

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

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3083#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3083: allow single band processing with i.landsat.toar
--------------------------+-------------------------
  Reporter: mankoff | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Raster | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Changes (by mankoff):

* Attachment "i.landsat.toar.diff" removed.

Diff that implements option to process a single band.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3083&gt;
GRASS GIS <https://grass.osgeo.org>

#3083: allow single band processing with i.landsat.toar
--------------------------+-------------------------
  Reporter: mankoff | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Raster | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Changes (by mankoff):

* Attachment "i.landsat.toar.diff" added.

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

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3083&gt;
GRASS GIS <https://grass.osgeo.org>

#3083: allow single band processing with i.landsat.toar
--------------------------+-------------------------
  Reporter: mankoff | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.4.0
Component: Raster | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by neteler):

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

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3083#comment:6&gt;
GRASS GIS <https://grass.osgeo.org>

looks trivial enough, sub looping to the band assigned in the optional input.

On 30/05/2017 09:35, GRASS GIS wrote:

#3083: allow single band processing with i.landsat.toar
--------------------------+-------------------------
   Reporter: mankoff | Owner: grass-dev@…
       Type: enhancement | Status: new
   Priority: normal | Milestone: 7.4.0
  Component: Raster | Version: unspecified
Resolution: | Keywords:
        CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by neteler):

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

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3083#comment:6&gt;
GRASS GIS <https://grass.osgeo.org>

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

#3083: allow single band processing with i.landsat.toar
--------------------------+-------------------------
  Reporter: mankoff | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.4.0
Component: Raster | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by mlennert):

Replying to [comment:6 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 [https://lists.osgeo.org/pipermail/grass-
dev/2017-May/085126.html Yann] that this is a quite trivial patch.

I haven't tested, though.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3083#comment:7&gt;
GRASS GIS <https://grass.osgeo.org>