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

Micha Silver micha at arava.co.il
Tue Feb 26 08:58:14 EST 2008


(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



More information about the grass-user mailing list