On Mon, Jan 31, 2011 at 4:49 PM, Johannes Radinger <[email protected]> wrote:
> Hello,
>
> I've got a rastermap (river-network) with differnent category values
> representing the single sections. Now I want to create points, excactly one
> point per section. I'd be best if the point is approximately in the middle
> of each the raster-line, but a random value would be already okay.

What about (untested):
- convert to vector
- upload the length to each vector as attribute with v.to.db
  or use v.report line option=length units=meters
- loop over all vectors
   - extract one vector
   - fetch length, divide by 2
   - use v.to.points -n in=line out=line_node dmax=half_length
   - extract the first one (cat=1) with v.extract

Cheers
Markus
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to