Hi Joshua,

Am 24.11.2021 00:23 schrieb Joshua Geoghegan:
Hi Moritz,

When I set it to layer 2 (which is the point layer I connected) and
close the v.net.distance dialog, and reopen it I see the form reload
and it switches back to 1.

I also try to create the where clause and now it says no table linked
to layer 2 even though I linked it with v.db.connect.

There is no v.db.connect in the commands you list in the attached image.

Below are the steps up until v.net.distance, with my network being
cleaned up beforehand.

Please if in any way possible include the commands in a text (not image) form. That makes it much easier to add targeted comments and responses.


The highlighted section is where I import the points up until the
v.net.distance.

Your v.import and v.net seem ok (assuming that a threshold of 2 is enough to cover all points you want to connect).

I probably don’t need the v.db.addtable. That was there so I could
populate the distance for each route but I guess v.net.distance
outputs that.

Yes. From the man page:

"A table is linked to output map containing various information about the relation. More specifically, the table has three columns: cat, tcat and dist storing category of each from feature, category of the nearest to feature and the distance between them respectively."

So, the important part is the v.net.distance call. Several remarks:

- Your from_layer and to_layer should be = 2 since that is where your points are. - In your original mail you spoke about calculating shortest path between one point and all others. If that is still the case you have to either use from_cat and to_cat to select based on category values, or use from_where and to_where to select based on attributes. - If you want to use attributes, you have to use v.db.connect to connect the table linked to your original point map to the node layer in your network map.

It still didn’t work when I removed that.

When you say it didn't work, what exactly happened ?

Moritz
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to