No subject
Susan Stitt
nps!susan at cerl.cecer.army.mil
Fri Jul 9 12:00:05 EDT 1993
>
>> We have vector files representing tributaries to a river.
>> Is there a command in GRASS4.0 or
>> 4.1 that will give me the vector length of either 1) each category
>> in a file or 2) the whole vector file?
>>
>> Background: The vector files are dlg stream data which are imported into
>> GRASS4.0. We can use v.digit to either categorize all the tributaries in
>> each file by
>> stream order (in which case we'd like to use choice #1, above)
>> OR we can create files containing only the first order tributaries,
>> then create a file containing only the 2d order tributaries, etc (in which
>> case we'd like to use choice #2, above).
>>
>> Thanks in advance for all help!
>> -Nancy
>>
>
>There is a wonderful program called v.report, found under src.contrib/SCS/vector
>in GRASS4.1. It reports on length of vectors, areas of polygons, and number of
>sites in GRASS vector layers. Good stuff (reason enough to get 4.1!!) (along
>with v.reclass!).
>
>--
>Malcolm D. Williamson - Research Assistant E-mail: malcolm at cast.uark.edu
>Center for Advanced Spatial Technologies Telephone: (501) 575-6159
>Ozark Rm. 12 Fax: (501) 575-3846
>University of Arkansas
>Fayetteville, AR 72701
v.report is the program you need, however be very careful that it is reporting
the correct information. We have made several fixes to our code which I will
attempt to attach to this note. Both our 4.0 and 4.1 versions of this program
did not provide the correct length information until we made some changes to
the source code....
I have previously sent this to the grassu-list, but am attaching it again:
We did not catch the problem with the
category files, if the dig_cats file is not complete, it won't continue.
However, v.report appears to work with either a complete file, or no
dig_cats file, so my suggestion would be to move the cats file (if incomplete)
to a backup name, run v.report, then move the cats file back, at least until
this bug gets fixed...
Susan Stitt, National Park Service-GIS Division susan%nps at cerl.cecer.army.mil
v.report/cmd/do_v_stats.c
old line 239
fprintf(dumpfile,"area\n");
new line 239
fprintf(dumpfile,"area%d\n",cnt);
v.report/cmd/perimeter.c
old line 17
if(i==((np-1)-1))
new line 17
if(i==(np-1))
v.report/cmd/prt_report.c
old line 64
unit[i].factor =1.0e+3;
new line 64
unit[i].factor =1.0e-3;
v.report/cmd/stats.c
old line 39
sscanf(buf,"%s,%d",atype, &nalloc);
new line 39
sscanf(buf,"%s%d",atype, &nalloc);
and
old line 48
Gstats = (GSTATS *) G_calloc (nalloc, sizeof(GSTATS));
new line 48
Gstats=(GSTATS *) G_malloc ((int)(nalloc * sizeof(GSTATS)));
v.report/cmd/Gmakefile
old line 23
$(CC) $(LDFLAGS) -o $@ $(LIST) $(VECTLIB) $(GISLAB) $(LIBES) $(MATHLIB)
new line 23
$(CC) $(LDFLAGS) -o $@ $(LIST) $(LIBES) $(VECTLIB) $(GISLIB) $(MATHLIB)
v.report/inter/Gmakefile
old line 7
$(CC) $(LDFLAGS) -o $@ $(LIST) $(VECTLIB) $(GISLIB) $(VASK) $(LIBES)
new line 7
$(CC) $(LDFLAGS) -o $@ $(LIST) $(GISLIB) $(VASK)
More information about the grass-user
mailing list