Selaa lähdekoodia

v.what.rast: remove nonsense special case handling

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54143 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 12 vuotta sitten
vanhempi
commit
557dec7891
1 muutettua tiedostoa jossa 6 lisäystä ja 16 poistoa
  1. 6 16
      vector/v.what.rast/main.c

+ 6 - 16
vector/v.what.rast/main.c

@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
     CELL *cell;
     DCELL *dcell;
     int width;
-    double drow, dcol;
+    int row, col;
     char buf[2000];
     struct {
 	struct Option *vect, *rast, *field, *col, *where;
@@ -188,21 +188,11 @@ int main(int argc, char *argv[])
 	G_debug(4, "    cat = %d", cat);
 
 	/* Add point to cache */
-	drow = Rast_northing_to_row(Points->y[0], &window);
-	dcol = Rast_easting_to_col(Points->x[0], &window);
-
-	/* a special case.
-	 *   if north falls at southern edge, or east falls on eastern edge,
-	 *   the point will appear outside the window.
-	 *   So, for these edges, bring the point inside the window
-	 */
-	if (drow == window.rows)
-	    drow--;
-	if (dcol == window.cols)
-	    dcol--;
-
-	cache[point_cnt].row = (int)drow;
-	cache[point_cnt].col = (int)dcol;
+	row = Rast_northing_to_row(Points->y[0], &window);
+	col = Rast_easting_to_col(Points->x[0], &window);
+
+	cache[point_cnt].row = row;
+	cache[point_cnt].col = col;
 	cache[point_cnt].cat = cat;
 	cache[point_cnt].count = 1;
 	point_cnt++;