Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3056 closed enhancement (fixed)

]PATCH] r.patch: disable creation of support files

Reported by: mlennert Owned by: grass-dev@…
Priority: normal Milestone: 7.2.0
Component: Raster Version: unspecified
Keywords: r.patch categories colors Cc:
CPU: Unspecified Platform: Unspecified

Description

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 ?

Attachments (1)

r.patch_nosupportfiles.diff (3.1 KB ) - added by mlennert 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by martinl, 8 years ago

Milestone: 7.0.57.2.0

comment:2 by neteler, 8 years ago

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?

in reply to:  2 comment:3 by mlennert, 8 years ago

Replying to 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.

by mlennert, 8 years ago

Attachment: r.patch_nosupportfiles.diff added

comment:4 by sbl, 8 years ago

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.

comment:5 by mlennert, 8 years ago

Resolution: fixed
Status: newclosed

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

Closing for now.

Moritz

comment:6 by sbl, 8 years ago

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

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

Replying to 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.

Note: See TracTickets for help on using tickets.