Changeset 66450
- Timestamp:
- Oct 9, 2015, 9:55:34 AM (9 years ago)
- Location:
- grass/branches/releasebranch_7_0/raster/r.patch
- Files:
-
- 4 edited
-
do_patch.c (modified) (2 diffs)
-
local_proto.h (modified) (1 diff)
-
main.c (modified) (4 diffs)
-
r.patch.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
grass/branches/releasebranch_7_0/raster/r.patch/do_patch.c
r61338 r66450 22 22 int do_patch(void *result, void *patch, 23 23 struct Cell_stats *statf, int ncols, 24 RASTER_MAP_TYPE out_type, int use_zero)24 RASTER_MAP_TYPE out_type, size_t out_cell_size, int use_zero) 25 25 { 26 26 int more; … … 57 57 } /* NULL support */ 58 58 } 59 result = G_incr_void_ptr(result, Rast_cell_size(out_type));60 patch = G_incr_void_ptr(patch, Rast_cell_size(out_type));59 result = G_incr_void_ptr(result, out_cell_size); 60 patch = G_incr_void_ptr(patch, out_cell_size); 61 61 } 62 62 return more; -
grass/branches/releasebranch_7_0/raster/r.patch/local_proto.h
r32526 r66450 1 1 /* do_patch.c */ 2 2 int do_patch(void *result, void *, struct Cell_stats *, int, RASTER_MAP_TYPE, 3 int);3 size_t, int); 4 4 /* support.c */ 5 5 int support(char **, struct Cell_stats *, int, struct Categories *, -
grass/branches/releasebranch_7_0/raster/r.patch/main.c
r63346 r66450 32 32 int outfd; 33 33 RASTER_MAP_TYPE out_type, map_type; 34 size_t out_cell_size; 34 35 struct History history; 35 36 void *presult, *patch; … … 55 56 G_add_keyword(_("geometry")); 56 57 G_add_keyword(_("mosaicking")); 58 G_add_keyword(_("merge")); 59 G_add_keyword(_("patching")); 57 60 module->description = 58 61 _("Creates a composite raster map layer by using " … … 112 115 } 113 116 117 out_cell_size = Rast_cell_size(out_type); 118 114 119 rname = opt2->answer; 115 120 outfd = Rast_open_new(new_name = rname, out_type); … … 144 149 Rast_get_row(infd[i], patch, row, out_type); 145 150 if (!do_patch 146 (presult, patch, &statf[i], ncols, out_type, use_zero)) 151 (presult, patch, &statf[i], ncols, out_type, out_cell_size, 152 use_zero)) 147 153 break; 148 154 } -
grass/branches/releasebranch_7_0/raster/r.patch/r.patch.html
r63776 r66450 22 22 "no data" cells. 23 23 24 <h 2>EXAMPLE</h2>24 <h3>Example of filling areas</h3> 25 25 26 Below, the raster map layer on the far left is <b>patched</b> 27 with the middle (<em>patching</em>) raster map layer, 28 to produce the <em>composite</em> raster map layer on the right. 26 <!-- this example is also used in the tests --> 27 28 Below, the raster map layer on the far left is <b>patched</b> 29 with the middle (<em>patching</em>) raster map layer, 30 to produce the <em>composite</em> raster map layer on the right. 31 The example assumes zero values to be treated as NULLs (<b>-z</b> flag). 29 32 30 33 <div class="code"><pre> … … 48 51 4 4 4 4 4 4 4 4 0 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 49 52 </pre></div> 53 50 54 51 55 <h2>NOTES</h2>
Note:
See TracChangeset
for help on using the changeset viewer.
