[GRASS-SVN] r62557 - in grass/branches/releasebranch_7_0: . raster/r.recode
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Nov 2 13:16:24 PST 2014
Author: annakrat
Date: 2014-11-02 13:16:24 -0800 (Sun, 02 Nov 2014)
New Revision: 62557
Modified:
grass/branches/releasebranch_7_0/
grass/branches/releasebranch_7_0/raster/r.recode/read_rules.c
Log:
r.recode: fix #2053 - change input type to be always double (merge from trunk, r62518)
Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
- /grass/trunk:62179-62180,62182,62403,62466,62487,62491,62494,62506,62508-62509,62515,62519,62521,62526,62533,62539,62541,62555
+ /grass/trunk:62179-62180,62182,62403,62466,62487,62491,62494,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555
Modified: grass/branches/releasebranch_7_0/raster/r.recode/read_rules.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.recode/read_rules.c 2014-11-02 20:55:12 UTC (rev 62556)
+++ grass/branches/releasebranch_7_0/raster/r.recode/read_rules.c 2014-11-02 21:16:24 UTC (rev 62557)
@@ -50,7 +50,8 @@
DCELL oLow, oHigh, nLow, nHigh;
int line, n;
- in_type = out_type = CELL_TYPE;
+ in_type = DCELL_TYPE;
+ out_type = CELL_TYPE;
rules = (char **)G_malloc(INCR * sizeof(char *));
rule_size = INCR;
@@ -98,16 +99,12 @@
lookup the values in the quant table */
switch (sscanf(buf, "%lf:%lf:%lf:%lf", &oLow, &oHigh, &nLow, &nHigh)) {
case 3:
- update_type(&in_type, oLow);
- update_type(&in_type, oHigh);
update_type(&out_type, nLow);
update_rules(buf);
Rast_fpreclass_add_rule(&rcl_struct, oLow, oHigh, nLow, nLow);
break;
case 4:
- update_type(&in_type, oLow);
- update_type(&in_type, oHigh);
update_type(&out_type, nLow);
update_type(&out_type, nHigh);
update_rules(buf);
@@ -116,13 +113,11 @@
default:
if (sscanf(buf, "%lf:*:%lf", &oLow, &nLow) == 2) {
- update_type(&in_type, oLow);
update_type(&out_type, nLow);
update_rules(buf);
Rast_fpreclass_set_pos_infinite_rule(&rcl_struct, oLow, nLow);
}
else if (sscanf(buf, "*:%lf:%lf", &oHigh, &nLow) == 2) {
- update_type(&in_type, oHigh);
update_type(&out_type, nLow);
update_rules(buf);
Rast_fpreclass_set_neg_infinite_rule(&rcl_struct, oHigh, nLow);
More information about the grass-commit
mailing list