[GRASS-dev] calculate distance with vector

Moritz Lennert mlennert at club.worldonline.be
Wed Jun 10 15:15:22 EDT 2009


On 10/06/09 17:16, Quentin Page wrote:
> hi,
> 
> I want to know what are distances between several little vectors and the 
> big one.
> so I write :
> 
> v.distance -p -a from=grille247 at ventoux288 to=roland3 at ventoux288 
> from_type=centroid to_type=boundary from_layer=1 to_layer=1 dmax=-1 
> upload=cat,dist table=cat,dist
> 
> the little vectors are in grille247 and they contain lots of another 
> information.
> the error is
> Required parameter <column> not set:
> (Column name(s) where values specified by 'upload' option will be uploaded)
> 
> how can i set the column.

Just use column=cat,dist (or whatever names you want) instead of 
table=cat,dist. The table= parameter allows you to set the name of a 
table that will be created when using the -a flag to get complete 
distance matrices.

However, in your case, as you use the -p flag, no table will be created 
and results just sent to standard output. However, it still needs the 
column= parameter set to know how to name the output columns. I do think 
that v.distance could just use sensible default names (i.e. the names of 
  the different options of the upload= parameter - with the exception of 
cat, which should be called to_cat to avoid naming conflicts).


Moritz


More information about the grass-dev mailing list