[GRASS-user] Point count with large vectors

Richard Chirgwin rchirgwin at ozemail.com.au
Tue May 12 04:25:42 EDT 2009


Hamish wrote:
> Richard wrote:
>>>> I have two large points files (>20,000 sites), and I want to
>>>> find the number of points in A falling within a given distance
>>>> of the points in B.
> ....
>>>> I can use a buffer from Map A and run v.distance, but it takes an
>>>> extremely long time, so suggestions would be welcome!
> ....
>> As to "a long time", I left one loop running for several
>> days and only completed
>> one state of Australia!
> 
> 
> to speed it up perhaps v.buffer + v.select could be used as a
> pre-processing step to remove any points which are too far from both
> A and B? maybe v.buffer for both A and B, v.overlay those two together,
> then v.select only A and B points in that area, and finally run
> v.distance for only the reduced list of points?
> 
> 
> Hamish
> 
> 
> 
>       
> 
> 
Hamish,

As it turned out, all I needed was the dunce's cap for not trying v.distance -a.

I do use a v.buffer loop for smaller data sets than this one!

(PS to Markus, various versions depending on platform; 6.3 on the Macs, 6.4 svn
2008 on Linux.

I don't think there was a memory leak problem - at one point, I stuck a d.vect
into my loop to draw the moving buffer, to make sure that I wasn't just looking
at a stuck machine!

I could run things up to Tasmania-size in reasonable time, but Western Australia
is really *big*. Still, got it under control now (thanks again Moritz).

Cheers all,
Richard


More information about the grass-user mailing list