[GRASS-SVN] r66360 - grass-addons/grass7/vector/v.kriging
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Sep 28 00:22:34 PDT 2015
Author: neteler
Date: 2015-09-28 00:22:34 -0700 (Mon, 28 Sep 2015)
New Revision: 66360
Modified:
grass-addons/grass7/vector/v.kriging/geostat.c
grass-addons/grass7/vector/v.kriging/utils_kriging.c
Log:
v.kriging addon: fix compiler warning -Wabsolute-value and return in void function
Modified: grass-addons/grass7/vector/v.kriging/geostat.c
===================================================================
--- grass-addons/grass7/vector/v.kriging/geostat.c 2015-09-27 23:06:39 UTC (rev 66359)
+++ grass-addons/grass7/vector/v.kriging/geostat.c 2015-09-28 07:22:34 UTC (rev 66360)
@@ -229,7 +229,7 @@
ddir1 = dir - tv; // difference between bearing and azimuth
ddir2 = (dir + PI) - tv;
- if (fabsf(ddir1) <= td || fabsf(ddir2) <= td) { // angle test: compare the diff with critical value
+ if (fabs(ddir1) <= td || fabs(ddir2) <= td) { // angle test: compare the diff with critical value
// test squared distance: vertical variogram => 0., ...
rv = type == 1 ? 0. : radius_hz_diff(dr); // ... otherwise horizontal distance
@@ -238,11 +238,11 @@
}
rvh = sqrt(rv) - *h; // the difference between distance and lag
- if (rv <= radius && fabsf(rvh) <= lag) { // distance test: compare the distance with critical value and find out if the j-point is located within i-lag
+ if (rv <= radius && fabs(rvh) <= lag) { // distance test: compare the distance with critical value and find out if the j-point is located within i-lag
if (type == 2) { // vertical test for bivariate variogram:
rvh = *(dr + 2) - *vert; // compare vertical
- if (fabsf(rvh) <= lag_vert) { // elevation test: vertical lag
+ if (fabs(rvh) <= lag_vert) { // elevation test: vertical lag
goto delta_V;
}
else {
Modified: grass-addons/grass7/vector/v.kriging/utils_kriging.c
===================================================================
--- grass-addons/grass7/vector/v.kriging/utils_kriging.c 2015-09-27 23:06:39 UTC (rev 66359)
+++ grass-addons/grass7/vector/v.kriging/utils_kriging.c 2015-09-28 07:22:34 UTC (rev 66360)
@@ -175,7 +175,7 @@
double diff_sill_05, diff_sill;
diff_sill_05 = sill_hz > sill_vert ? 0.05 * sill_hz : 0.05 * sill_vert; // critical value as 5% from bigger sill
- diff_sill = fabsf(sill_hz - sill_vert); // difference between the sills
+ diff_sill = fabs(sill_hz - sill_vert); // difference between the sills
if (xD->bivar == TRUE || (!flg->univariate->answer && diff_sill > diff_sill_05)) { // zonal anisotropy
var_par->fin.type = 2; // code for bivariate variogram
@@ -196,8 +196,6 @@
xD->aniso_ratio = var_par->hz.h_range / var_par->vert.h_range; // anisotropic ratio
geometric_anisotropy(xD, pnts); // exaggerate z coords and build a new spatial index
}
-
- return 0;
}
// formulation of variogram functions
@@ -669,7 +667,7 @@
//Create output
*norm = rslt_OK - *vals; // differences between input and interpolated values
- *av = fabsf(*norm); // absolute values of the differences (quantile computation)
+ *av = fabs(*norm); // absolute values of the differences (quantile computation)
if (xD->i3 == TRUE) { // 3D interpolation:
fprintf(fp, "%d %.3f %.3f %.2f %f %f %f\n", i, *r, *(r + 1),
More information about the grass-commit
mailing list