I've looked in the db.*, v.*, and addon modules (thought v.mapcalc might
work but apparently not) and have not seen how to add the lengths of all
stream/river segments within a drainage basin. Is there such a tool?
Regards,
Rich
I've looked in the db.*, v.*, and addon modules (thought v.mapcalc might
work but apparently not) and have not seen how to add the lengths of all
stream/river segments within a drainage basin. Is there such a tool?
Regards,
Rich
Rich Shepard wrote
I've looked in the db.*, v.*, and addon modules (thought v.mapcalc might
work but apparently not) and have not seen how to add the lengths of all
stream/river segments within a drainage basin. Is there such a tool?Regards,
Rich
_______________________________________________
grass-user mailing list
grass-user@.osgeo
v.to.db option=length
length: line length
?
-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html
On Fri, 31 Aug 2018, Helmut Kudrnovsky wrote:
v.to.db option=length
length: line length
Helmut,
This occurred to me a short time ago.
I'm adding a 'length' column to the db, then run v.to.db. If need be, I'll
export the table to a text file, and write a 2-line gawk script to sum that
one column.
Carpe weekend,
Rich
Rich Shepard wrote
On Fri, 31 Aug 2018, Helmut Kudrnovsky wrote:
v.to.db option=length
length: line lengthHelmut,
This occurred to me a short time ago.
I'm adding a 'length' column to the db, then run v.to.db. If need be,
I'll
export the table to a text file, and write a 2-line gawk script to sum
that
one column.Carpe weekend,
Rich
_______________________________________________
grass-user mailing list
grass-user@.osgeo
What is missing in the manual that the option length can't be found?
-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html
On Fri, 31 Aug 2018, Helmut Kudrnovsky wrote:
What is missing in the manual that the option length can't be found?
Helmut,
Nothing. What I used:
# calculate stream lengths
v.db.addcolumn map=wrb_rivers columns='length double precision'
v.to.db map=wrb_rivers opt=length column=length units=kilometers
db.select sql='sum(length) from wrb_rivers'
Works like advertised.
Best regards,
Rich
Don’t forget that there’s the v.univar module to get sum, mean, sd, etc of all features in a vector. Also there’s the excellent set of r.stream.* addons. The r.stream.stats module might be especially suited here.
On 09/01/2018 12:08 AM, Rich Shepard wrote:
On Fri, 31 Aug 2018, Helmut Kudrnovsky wrote:
v.to.db option=length
length: line lengthHelmut,
This occurred to me a short time ago.
I’m adding a ‘length’ column to the db, then run v.to.db. If need be, I’ll
export the table to a text file, and write a 2-line gawk script to sum that
one column.
Carpe weekend,
Rich
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user
--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918
On Sat, 1 Sep 2018, Micha Silver wrote:
Don't forget that there's the v.univar module to get sum, mean, sd, etc of
all features in a vector. Also there's the excellent set of r.stream.*
addons. The r.stream.stats module might be especially suited here.
Thank you, Micha.
This time I wanted to show the number and distribution of sampling
locations in a river basin and all the streams and rivers it contains.
Relating the number and location of those sampling locations to the basin
area and total length of streams and rivers was the goal. Using the sql
sum() in db.select quickly provided that information.
Best regards,
Rich