[GRASS-user] Nothing Inserted into Attribute Table from v.to.db

Ryan R. Rosario uclamathguy at gmail.com
Fri Oct 3 13:03:36 EDT 2008


v.distance gives me a set of lines from my points vector to my lines vector.
I am trying to extract the point where each connecting line intersects a
line in the lines vector.

I used the GUI for the database copying and connection. I have added the
commands below:

v.distance from=incidents to=roads output=connecting_lines upload=cat
column=nearest
db.copy from_driver=dbf from_database=$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
from_table=incidents to_driver=dbf
to_database=$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/ to_table=connecting_lines 
v.db.connect map=connecting_lines driver=dbf
database=$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/ table=connecting_lines
key=nearest layer=1 
v.db.addcol map=connecting_lines layer=1 'columns=end_x double, end_y
double' 
v.net input=connecting_lines output=nodes operation=nodes alayer=1 nlayer=2 
#I also tried swapping alayer and nlayer with no luck. 
v.to.db map=nodes type=point,line,boundary,centroid layer=1 qlayer=1
option=end column=end_x,end_y 

#I may have forgotten to include a database command for the nodes vector
somewhere, but I have confirmed that the attribute tables for
connecting_lines and nodes are identical. 

Sorry for the vagueness, but I am thoroughly confused on what goes on with
these attribute tables at times.


Moritz Lennert-2 wrote:
> 
> On 03/10/08 08:57, Ryan R. Rosario wrote:
>> I have vector maps called "incidents" (points) and "roads" (lines). For
>> some
>> reason, I am getting nothing as output in the final attribute table; 
> 
> First of all: could you state clearly and precisely what you want to do ?
> 
>> that
>> is, the attribute table is not being updated at all. I am sure I am
>> making
>> some silly mistake.
>> 
> [...]
>> What could I be doing wrong?
> 
> This:
>  > v.distance from=incidents to=roads output=connecting_lines upload=cat
>  > column=nearest
>  > #I copied table "incidents" to "connecting_lines" and called it
>  > "connecting_lines". I used the option
>  > #key=nearest.
> 
> (Second: please be more explicit in the description of your actions. In 
> this case, for example, please tell us which command you used. I assume 
> v.db.connect...)
> 
> The output map of the v.distance command contains only lines for 
> visualisation which do not even contain a category value allowing to 
> identify each line. You cannot, therefore, link the map to a table. 
> Well, you can, but no records in the table will correspond to a line as 
> the latter do not have a ids.
> 
> Debatedly, v.distance could be enhanced to include some information in 
> an attribute table accompanying the map, such as from_cat and to_cat, 
> but someone would have to implement that.
> 
> Moritz
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
> 
> 

-- 
View this message in context: http://www.nabble.com/Nothing-Inserted-into-Attribute-Table-from-v.to.db-tp19793008p19801906.html
Sent from the Grass - Users mailing list archive at Nabble.com.



More information about the grass-user mailing list