[GRASS-user] Networks

achim ak7 at jupiter.uni-freiburg.de
Fri Jun 5 05:22:20 EDT 2009



achim schrieb:
> 
> achim schrieb:
>> achim schrieb:
>>> Hi,
>>>
>>> I am going to do some work on drainage networks I created. I could not
>>> figure out some basic procedures. Maybe, you have some ideas how to work
>>> with some of the following questions/tasks:
>>>
>>> 1) how is a network stored? creating it via v.net from a multiline "map"
>>> says it wants to create two layers: one with lines, the other with points
>>>  -> general problem: creating an table containing an entry for every
>>> object (Id). I know thats general, but why doesn't it work with
>>> v.db.newtable? And why answers v.to.db option=cat with
>>> "Reading features... Updating database... 0 categories read from vector
>>> map (layer 1) 0 records updated/inserted (layer 1)"?
>> to 1)
>> make sure, the map is connected to the desired database. if necessary
>> overwrite current connection and delete tables
>> -> db.droptable -f table=network
>> -> v.db.connect -d map=network at achim
>> then do a
>> -> v.db.addtable map=network at achim layer=1
>> all geometry objects get a number
>> (maybe a v.category is necessary before)
>>
>>  -> Questions remaining:
>> -how can I distinguish between points and polylines?
>> -how are connections (polyline)-node-(polyline/polyline) stored/defined?
> 
> -how can I distinguish between points and polylines?
> to add a layer you can set a geometry type (eg. type=point) and do a
> "v.category" (misleading name) in an additional layer
> v.category --overwrite input=network at achim output=network at achim
> type=point layer=2
> if you did it wrong before adding all geometries, you can delete
> (option=del) some of the categories
> v.category --overwrite input=network at achim output=network at achim
> option=del type=line layer=2

be careful with overwriting! It deletes the tabe I think!
> v.category --overwrite input=network at achim output=network at achim
> option=del type=line layer=2
so first do v.category with overwriting and then add:
v.db.addtable map=network at achim layer=1
v.db.addtable map=network at achim layer=2
here, it looks like one table with two layers, there are two tables:
network
network_2
(misleading again...but it works)

> 
> (I feel a bit schizo)
> 
> Questions remaining:
> -> how are connections (polyline)-node-(polyline/polyline) stored/defined?
> 
>>> 2) how can I identify each network by eg. an integer value? There are
>>> many unconnected trees, which I want to keep separated.
>>>  -> I tried it with v.buffer, on the one hand I couldn't upload the
>>> information to the network (points and polylines) and on the other hand
>>> it takes a lot of time.
>>>
>>> 3) can I define a "direction" of a network with values on the nodes?
>>> like a sorted tree? in order to get the sub trees?
>>>
>>> 4) how can I find out, which and how many lines are connected to a node?
>>>
>>> 5) ...there are some, but I think its enough; and furthermore the
>>> questions more or less depend on each other.
>>>
>>> Hoping, someone has some experience with that kind of stuff,
>>> kindly regards,
>>> Achim
>>> _______________________________________________
>>> grass-user mailing list
>>> grass-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user


More information about the grass-user mailing list