[GRASSLIST:856] Re: v.segment

Trevor Wiens twiens at interbaun.com
Tue Apr 25 02:26:41 EDT 2006


On Mon, 24 Apr 2006 23:00:15 -0700
Michael Barton <michael.barton at asu.edu> wrote:

> Use v.category to attach categories.
> 
> V.to.db to add information to attribute table? I don't know if this works
> with v.segment output or not. In fact, I can't figure out how v.segment
> works either.
> 
> Create a dbf file using a spreadsheet (OO or Excel -- OO works better). Call
> the first column "cat", make it an integer, and fill it with a sequence of
> numbers equal to the number of points you have. Then use v.db.connect to
> link them up.
> 

Michael,

Thanks, but not really what I wanted to hear. 

I wrote a script to make stops on Breeding Bird Survey route lines at
equal intervals, and manipulated the category values to be meaningful.

Unfortunately, v.segment doesn't create an attribute table so I used
v.build with the cdump option to get a list of the categories and then
used db.execute to add them one by one into a table. Very slow.

I can see now I could get a list easier using v.category, but
unfortunately it won't automagically create an attribute table with the
categories in it.

I was hoping for an easy way to do this as it would make the script a
lot more elegant and faster, but it appears that my ugly hack is the
only solution.

Thanks

T
-- 
Trevor Wiens 
twiens at interbaun.com

The significant problems that we face cannot be solved at the same 
level of thinking we were at when we created them. 
(Albert Einstein)




More information about the grass-user mailing list