[GRASS-user] LRS and v.build.polylines

I could use some guidance with linear referencing and v.build.polylines. I want to get the distances between posts along a bike trail. I have vector maps of the trails and the posts. I've added in the start_mp and other necessary columns to the posts database. Then I populated the start_mp column with values in the order the post points appear along the trail. And I've successfully run v.lrs.create on *some* of the trails/posts. But certain trails give this error:

WARNING: Not enough points (0) attached to the line (cat 1), line skip.

and the distances come out obviously wrong (as if there are gaps) .

Thinking the problem was with extra nodes along the trails, I tried to run v.build.polylines but what I get out is a vector with no attribute columns (no dbf file attached).

And if I do v.digit on the new polyline vector, I can still see extra nodes (in green) along the trail. I must be missing something simple.

So:

How do I properly add a dbf attribute table and columns to the new polyline vector? and

What do I need to do to get a clean polyline with no nodes other than the actual end points?

Thanks,

Micha

(responding to myself)

I've gotten part way thru my problem, but I'm stuck with the attribute table. See below

Micha Silver wrote:

I could use some guidance with linear referencing and v.build.polylines. I want to get the distances between posts along a bike trail. I have vector maps of the trails and the posts. I've added in the start_mp and other necessary columns to the posts database. Then I populated the start_mp column with values in the order the post points appear along the trail. And I've successfully run v.lrs.create on *some* of the trails/posts. But certain trails give this error:

WARNING: Not enough points (0) attached to the line (cat 1), line skip.

and the distances come out obviously wrong (as if there are gaps) .

I think I've worked this out as follows. The problematic routes were apparently collected in bits and patched together, but some of the sections were collected in opposite direction So I did a v.out.ascii, then manually juggled the points around. Now after v.in.ascii, I can do v.build.polylines, and I get one line with no extra nodes.

But...
The new polyline has no attrib table. When I run v.db.addtable the table is created and I can add columns, but no cat value appears, and I can't insert any values.
Here's what I get:
GRASS 6.2.2 (ITM):~ > v.db.addtable map=new_hotze_pl col='cat integer, objectid integer'
Using vector map name as table name: new_hotze_pl
Creating new DB connection based on default mapset settings...
Creating table with columns (cat integer, objectid integer)
WARNING: The table <new_hotze_pl> is now part of vector map <new_hotze_pl>
         and may be deleted or overwritten by GRASS modules
WARNING: Select privileges were granted on the table
Updating database ... 100%
1 categories read from map
0 records selected from table
0 categories read from map exist in selection from table
0 categories read from map don't exist in selection from table
0 records updated/inserted
0 update/insert errors

Current attribute table links:
Vector map <new_hotze_pl> is connected by:
layer <1> table <new_hotze_pl> in database </home/micha/geodata/ITM/Arava/dbf/> through driver <dbf> with key <cat>

Why isn't a cat added to the table? Why can't I add attrib values manually (v.db.update silently does nothing)
GRASS 6.2.2 (ITM):~ > v.db.update map=new_hotze_pl col=objectid val=11
GRASS 6.2.2 (ITM):~ > v.db.select map=new_hotze_pl
cat|objectid
GRASS 6.2.2 (ITM):~ >

TIA,
Micha