[GRASS-user] Non-Topological Vector Polygon Layer From r.water.outlet

Helmut Kudrnovsky hellik at web.de
Wed Oct 26 12:02:14 PDT 2016


>3. Cut the basin polygons using a geological polygon map and and calculate
km2 or percentage of km2 for each lithological >unit found within each
basin.  After denormalizing these areas & lithologies (rows as samples and
the columns km2 of each >lithology) one can then perform linear regression
models on the chemical analysis.

at least for 3.: you may stay in the raster world?

e.g. in a loop

- v.to.rast your geological map
- calculate your basin with the sample points (x,y coordinates) by
r.water.outlet [3]
- do r.stats [2] with the rasterized geological map and your basin to get
the percent/km2 portion of geologic units per basin; you can export these
statistics to a csv file
- join back this csv file to your vector outlet point

have a look at [4] where I've done this workflow mentioned above in an addon

[1]
https://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.habitat.dem/v.habitat.dem.py
[2] https://grass.osgeo.org/grass73/manuals/r.stats.html
[3] https://grass.osgeo.org/grass73/manuals/r.water.outlet.html
[4]
https://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.habitat.dem/v.habitat.dem.py#L411




-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Non-Topological-Vector-Polygon-Layer-From-r-water-outlet-tp5292824p5292867.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list