vector extract

Preston Halland stonemn
Sat Apr 25 15:04:26 EDT 1992


I am seeking to extract vectors from an existing coverage into a new
coverage based on category.  I have attempted to accomplish this first
though the v.extract command, and then using v.db.rim.  Both of these
approaches have failed thus far as described below.

The command v.extract produced a coverage which contained a subset of
all arcs within the desired category.  This subset usually contained
only one arc out of a set on the order of ten arcs.  The coverage from
which the extraction was attempted consists of 890 arcs,
approximately 80%(?) of which are labelled with a four digit code.  The
remaining arcs are unlabelled.

I next tried to use v.db.rim to extract the arcs we were interested
in.  We created a data base using the following definition file:

.make
WATSHED.6 DATABASE
==================

Record #: ~sSeqnum~
Reference Map: ~mRM
Vector Type: ~vVty
East: ~xEast~~~~~~
North: ~yNorth~~~~~~
Stream Code: ~istc
.end


The vector coverage was then read into the data base using the command
".read_vect [vector coverage name] stc."  This caused the vector
coverage to be loaded with the four digit category information going
into the "Stream Code" field.

The data base was now queried for a specific stream code category.
This resulted in an arc set within which all arcs had the specified
category value.  However display of this arc set revealed that several
arcs with the specified value in the source coverage were missing
from the query set.  Additionally,  several arcs which did not have the
specified category in the source coverage were included in the query
set.  Thus the query set was not strictly a subset of the arcs within
the desired category.  However, it is noteworthy that all of the arcs
within the query set had the correct category code, and all of the arcs
in the query set had at least one node associated with the correct
category.

The data base was also queried to find records within a mask.
Approximately 95% of the labelled arcs within the mask were returned.
No arcs outside of the mask were returned.  It is noteworthy that the
arcs missing from the category specific queries were also missing in
this mask query.  This leads me to believe that the error is occurring
in the loading of the vector coverage into the data base.  It seems
that both the category loading and the pointers between the data base
and the vector coverage are in error in some related way.

If you can help solve our problems with either v.extract or v.db.rim,
please send us mail.  Thank you.





More information about the grass-user mailing list