[GRASSLIST:3941] Re: How to generate merge key in Grass to enable merging data in R?

Craig Aumann caumann at ualberta.ca
Fri Jul 16 16:37:33 EDT 2004


> > I don't think I completely I understand your approach here.   Why do you
> > want length/2 and secondly, how would one calculate/get at this?  I
> > suspect under your approach I'd also need either the begining or ending
> > vertex for the vector...
> 
> echo "alter table lines add column len double precision" | db.execute
> v.to.db map=lines option=length col1=len
> echo "select cat,length/2 from lines" | db.select -c \
>   | sed 's/\(.*\)|\(.*\)/P \1 \1 \2/' | v.segment input=lines output=centres


Thanks Radim!  

My only comment is that this is taking a VERY long time.  I have
~150,000 lines in the database and so far this has been running for 4
hours and its not done yet.   The "centres" coor file is being written
to, so I think things are running fine. 

Cheers!
Craig




More information about the grass-user mailing list