[GRASS-user] nearest point to a line

Richard Chirgwin rchirgwin at ozemail.com.au
Sun Mar 14 15:36:55 EDT 2010

> ------------------------------
> Message: 3
> Date: Sat, 13 Mar 2010 21:04:26 +0100
> From: Malte Martin <malte at perlomat.de>
> Subject: [GRASS-user] nearest point to a line
> To: grass-user at lists.osgeo.org
> Message-ID: <5F3C1CB5-3E88-4C31-8379-8740F88CB001 at perlomat.de>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
> Hi Grass users!
> After a few years without GRASS I'm starting to work with GRASS again.  
> And of course I have some problems or better questions if GRASS will  
> fit my needs.
> I have to find the nearest point to a line. I think v.distance wil do  
> the trick but I'm a little bit confused. My idea is using v.distance  
> with a threshold. The output should be a table with the point number  
> or better point designation, the distance and the designation of the  
> line. So I'll be able to sort the table with the minimum distance of  
> each line. But I'm "lost in documentation" somehow. It would be great  
> if someone could give me a short hint. How can I get the output (of  
> course the desginations are attributes of the sites and lines).
> Thanks in advance!
> Malte Martin
v.distance using the -a flag allows you to specify an output table. In 
the output table, from_cat is created automatically. Specify upload=cat 
column=to_cat will capture the to-category.

Unfortunately, for me anyhow, if I use upload=cat,attr and 
column=to_cat,<attribute name> it fails - but you can use the from_cat 
and to_cat to populate other database columns in the db instead of Grass.


More information about the grass-user mailing list