[GRASS-SVN] r65249 - grass/trunk/raster/r.topidx
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri May 15 08:42:52 PDT 2015
Author: hcho
Date: 2015-05-15 08:42:52 -0700 (Fri, 15 May 2015)
New Revision: 65249
Modified:
grass/trunk/raster/r.topidx/main.c
grass/trunk/raster/r.topidx/topidx.c
Log:
r.topidx: indent
Modified: grass/trunk/raster/r.topidx/main.c
===================================================================
--- grass/trunk/raster/r.topidx/main.c 2015-05-15 14:45:57 UTC (rev 65248)
+++ grass/trunk/raster/r.topidx/main.c 2015-05-15 15:42:52 UTC (rev 65249)
@@ -51,7 +51,7 @@
exit(EXIT_FAILURE);
/* Make sure that the current projection is not lat/long */
- if ((G_projection() == PROJECTION_LL))
+ if (G_projection() == PROJECTION_LL)
G_fatal_error(_("Lat/Long location is not supported by %s. Please reproject map first."),
G_program_name());
Modified: grass/trunk/raster/r.topidx/topidx.c
===================================================================
--- grass/trunk/raster/r.topidx/topidx.c 2015-05-15 14:45:57 UTC (rev 65248)
+++ grass/trunk/raster/r.topidx/topidx.c 2015-05-15 15:42:52 UTC (rev 65249)
@@ -125,7 +125,8 @@
sum += route[0];
nroute++;
}
- if (!is_cv_null(i - 1, j) && cv(i, j) - cv(i - 1, j) > ZERO) {
+ if (!is_cv_null(i - 1, j) &&
+ cv(i, j) - cv(i - 1, j) > ZERO) {
tanB[1] = (cv(i, j) - cv(i - 1, j)) * dx1;
route[1] = 0.5 * dx * tanB[1];
sum += route[1];
@@ -148,7 +149,8 @@
nroute++;
}
if (j + 1 < window.cols) {
- if (!is_cv_null(i, j + 1) && cv(i, j) - cv(i, j + 1) > ZERO) {
+ if (!is_cv_null(i, j + 1) &&
+ cv(i, j) - cv(i, j + 1) > ZERO) {
tanB[5] = (cv(i, j) - cv(i, j + 1)) * dx1;
route[5] = 0.5 * dx * tanB[5];
sum += route[5];
@@ -164,7 +166,8 @@
sum += route[6];
nroute++;
}
- if (!is_cv_null(i + 1, j) && cv(i, j) - cv(i + 1, j) > ZERO) {
+ if (!is_cv_null(i + 1, j) &&
+ cv(i, j) - cv(i + 1, j) > ZERO) {
tanB[7] = (cv(i, j) - cv(i + 1, j)) * dx1;
route[7] = 0.5 * dx * tanB[7];
sum += route[7];
@@ -187,46 +190,38 @@
nslp = 0;
if (i > 0) {
if (j > 0 && !is_cv_null(i - 1, j - 1)) {
- sumtb += (cv(i - 1, j - 1)
- - cv(i, j)) * dx2;
+ sumtb += (cv(i - 1, j - 1) - cv(i, j)) * dx2;
nslp++;
}
if (!is_cv_null(i - 1, j)) {
- sumtb += (cv(i - 1, j)
- - cv(i, j)) * dx1;
+ sumtb += (cv(i - 1, j) - cv(i, j)) * dx1;
nslp++;
}
if (j + 1 < window.cols && !is_cv_null(i - 1, j + 1)) {
- sumtb += (cv(i - 1, j + 1)
- - cv(i, j)) * dx2;
+ sumtb += (cv(i - 1, j + 1) - cv(i, j)) * dx2;
nslp++;
}
}
if (j > 0 && !is_cv_null(i, j - 1)) {
- sumtb += (cv(i, j - 1)
- - cv(i, j)) * dx1;
+ sumtb += (cv(i, j - 1) - cv(i, j)) * dx1;
nslp++;
}
if (j + 1 < window.cols && !is_cv_null(i, j + 1)) {
- sumtb += (cv(i, j + 1)
- - cv(i, j)) * dx1;
+ sumtb += (cv(i, j + 1) - cv(i, j)) * dx1;
nslp++;
}
if (i + 1 < window.rows) {
if (j > 0 && !is_cv_null(i + 1, j - 1)) {
- sumtb += (cv(i + 1, j - 1)
- - cv(i, j)) * dx2;
+ sumtb += (cv(i + 1, j - 1) - cv(i, j)) * dx2;
nslp++;
}
if (!is_cv_null(i + 1, j)) {
- sumtb += (cv(i + 1, j)
- - cv(i, j)) * dx1;
+ sumtb += (cv(i + 1, j) - cv(i, j)) * dx1;
nslp++;
}
if (j + 1 < window.cols && !is_cv_null(i + 1, j + 1)) {
- sumtb += (cv(i + 1, j + 1)
- - cv(i, j)) * dx2;
+ sumtb += (cv(i + 1, j + 1) - cv(i, j)) * dx2;
nslp++;
}
}
More information about the grass-commit
mailing list