[GRASS-dev] [GRASS GIS] #3056: ]PATCH] r.patch: disable creation of support files

#3056: ]PATCH] r.patch: disable creation of support files
---------------------------------------+-------------------------
Reporter: mlennert | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.5
Component: Raster | Version: unspecified
Keywords: r.patch categories colors | CPU: Unspecified
Platform: Unspecified |
---------------------------------------+-------------------------
r.patch can be very slow when patching a series of files with many
different category values. The slow part is the creation of the support
files. In some cases these support files are not necessary and so it would
be preferable to disable the creation of the support files. The attached
patch proposes to add a flag ('-s') to disable support files.

Any objections to me applying this patch ?

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

#3056: ]PATCH] r.patch: disable creation of support files
--------------------------+---------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version: unspecified
Resolution: | Keywords: r.patch categories colors
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------------
Changes (by martinl):

* milestone: 7.0.5 => 7.2.0

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

#3056: ]PATCH] r.patch: disable creation of support files
--------------------------+---------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version: unspecified
Resolution: | Keywords: r.patch categories colors
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------------

Comment (by neteler):

A wish - the current manual change proposal (maybe remove "very"):

  "This can be quite time consuming for certain maps, especially if there
are ~~very~~ many different category values across the patched maps. The
<em>-s</em> flag allows to disable support file creation."

should also mention the side effects when using the proposed flag. Will
other modules still accept such maps? Anything specific which will no
longer work and how to work-around?

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

#3056: ]PATCH] r.patch: disable creation of support files
--------------------------+---------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version: unspecified
Resolution: | Keywords: r.patch categories colors
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------------
Changes (by mlennert):

* Attachment "r.patch_nosupportfiles.diff" removed.

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

#3056: ]PATCH] r.patch: disable creation of support files
--------------------------+---------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version: unspecified
Resolution: | Keywords: r.patch categories colors
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------------

Comment (by mlennert):

Replying to [comment:2 neteler]:
> A wish - the current manual change proposal (maybe remove "very"):
>
> "This can be quite time consuming for certain maps, especially if there
are ~~very~~ many different category values across the patched maps. The
<em>-s</em> flag allows to disable support file creation."

Done in the new version of the diff.

>
> should also mention the side effects when using the proposed flag. Will
other modules still accept such maps? Anything specific which will no
longer work and how to work-around?

AFAIK, the only difference is that no category labels or color tables from
the original maps are kept, but this will not cause any issues for other
modules.

I enhanced the explanation in the patch.

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

#3056: ]PATCH] r.patch: disable creation of support files
--------------------------+---------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version: unspecified
Resolution: | Keywords: r.patch categories colors
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------------
Changes (by mlennert):

* Attachment "r.patch_nosupportfiles.diff" added.

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

#3056: ]PATCH] r.patch: disable creation of support files
--------------------------+---------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version: unspecified
Resolution: | Keywords: r.patch categories colors
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------------
Changes (by mlennert):

* Attachment "r.patch_nosupportfiles.diff" removed.

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

#3056: ]PATCH] r.patch: disable creation of support files
--------------------------+---------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version: unspecified
Resolution: | Keywords: r.patch categories colors
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------------

Comment (by sbl):

There might be a positive side effect from this patch: After patching a
lot of CELL tiles using current r.patch in combination with
r.external.out, resulting GeoTiffs are having interoperability issues (see
also: #3059). When I export via r.out.gdal I get a warning message that
Metadata exceeds 32000 bytes and cannot be written to GeoTiff?, and
therefore will be transferred to PAM.

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

#3056: ]PATCH] r.patch: disable creation of support files
--------------------------+---------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: enhancement | Status: closed
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version: unspecified
Resolution: fixed | Keywords: r.patch categories colors
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------------
Changes (by mlennert):

* status: new => closed
* resolution: => fixed

Comment:

As there didn't seem to be any real objections, I committed the patch in
r68681.

Closing for now.

Moritz

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

#3056: ]PATCH] r.patch: disable creation of support files
--------------------------+---------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: enhancement | Status: closed
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version: unspecified
Resolution: fixed | Keywords: r.patch categories colors
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------------

Comment (by sbl):

Any plans to backport the patch? Milestone of this ticket is 7.2, but the
s-flag is only in 7.3...

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

#3056: ]PATCH] r.patch: disable creation of support files
--------------------------+---------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: enhancement | Status: closed
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version: unspecified
Resolution: fixed | Keywords: r.patch categories colors
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------------

Comment (by mlennert):

Replying to [comment:6 sbl]:
> Any plans to backport the patch? Milestone of this ticket is 7.2, but
the s-flag is only in 7.3...

Thanks for the heads up. I haven't had any feedback on the patch, but as
it only adds a new flag and it shouldn't interfere in any way with the
current functioning of r.patch, I backported it to 7.2 in r69690.

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