[GRASS-SVN] r50082 - grass/trunk/vector/v.extrude
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jan 7 07:53:35 EST 2012
Author: mmetz
Date: 2012-01-07 04:53:35 -0800 (Sat, 07 Jan 2012)
New Revision: 50082
Modified:
grass/trunk/vector/v.extrude/main.c
Log:
v.extrude: file descriptor can be zero
Modified: grass/trunk/vector/v.extrude/main.c
===================================================================
--- grass/trunk/vector/v.extrude/main.c 2012-01-07 12:15:16 UTC (rev 50081)
+++ grass/trunk/vector/v.extrude/main.c 2012-01-07 12:53:35 UTC (rev 50082)
@@ -47,7 +47,7 @@
struct cat_list *Clist;
int field;
- int i, only_type, cat, ctype, fdrast = 0, areanum = 0;
+ int i, only_type, cat, ctype, fdrast = -1, areanum = 0;
int nelements;
int line, type;
int area, trace, centroid;
@@ -133,7 +133,7 @@
area = (only_type & GV_AREA) ? 1 : 0;
if (area) {
if (only_type & GV_BOUNDARY) {
- /* do not wrire wall twice -> disable boundary type */
+ /* do not write wall twice -> disable boundary type */
only_type &= ~GV_BOUNDARY;
}
only_type &= ~GV_AREA;
@@ -398,7 +398,7 @@
voffset_dem = 0.0;
/* do not trace -> calculate minumum dem offset */
- if (fdrast && !trace) {
+ if (fdrast >= 0 && !trace) {
for (k = 0; k < Points->n_points; k++) {
voffset_curr = Rast_get_sample(fdrast, &window, NULL,
Points->y[k], Points->x[k], 0,
@@ -422,7 +422,7 @@
voffset_curr = voffset_next = 0.0;
/* trace */
- if (fdrast && trace) {
+ if (fdrast >= 0 && trace) {
voffset_curr = Rast_get_sample(fdrast, &window, NULL,
Points->y[k], Points->x[k], 0,
NEAREST);
More information about the grass-commit
mailing list