[GRASS-user] measure distance

Hamish hamish_b at yahoo.com
Tue Oct 13 22:36:11 EDT 2009


note that the centroids can legally be placed anywhere within the area's
boundary, so measuring distances between them gives a constrained, but
mostly meaningless result.

if you really want to do it, the method I'd have used would be v.type +
v.distance.


shrug,
Hamish


Achim wrote:
> I did it the long-way. Here you are (here I am):
> -defining, whats the "next" polygon
> -updating table with coordinates of centroids
> -and the centroids of the next
> -writing these informations and cats number out
> -building standard-ascii-lines-import file with a bit of awk
> -import that
> -building table (with stored category-numbers)
> -adding column "length"
> -v.to.db option=length
> -update original table
> 
> Achim
> 
> Achim Kisseler schrieb:
> > Hi grass-users,
> > 
> > I am going to measure the distance from one centroid
> to another for many
> > polygons in a layer in order to update the table with
> the distance.
> > 
> > What would be a way? The only I can imagine so far
> is:
> > - collecting coordinates
> > - building lines from them
> > - update length of lines
> > - update old table
> > 
> > Is there another, better and faster way? Shouldn't be
> measuring of
> > distances a common tool? Do I just don't find it? Do I
> understand
> > v.distance wrong (it just returns the cat of the
> nearest feature)?
> > 
> > Achim



      


More information about the grass-user mailing list