[GRASS-user] Point count with large vectors

Richard Chirgwin rchirgwin at ozemail.com.au
Mon May 11 17:45:41 EDT 2009


Moritz Lennert wrote:
> On 09/05/09 00:51, Richard Chirgwin wrote:
>> Hi all,
>>
>> I'm not sure if this has been solved before.
>>
>> 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. So the
>> desired
>> output would be:
>>
>> Cat    Point count from B
>> 1    10
>> 2    3
>> 3    12
>> ...etc
>>
>> I can use a buffer from Map A and run v.distance, but it takes an
>> extremely long
>> time, so suggestions would be welcome!
> 
> Don't know if this would be much faster (what takes a long time in your
> approach ?), but you could use only v.distance to create a distance
> matrix (-a), and setting the threshold dmax to your distance.
> Then a simple aggregate query on the reulting table should give you what
> you need.

As to "a long time", I left one loop running for several days and only completed
one state of Australia!

And now an embarrassing admission, in spite of using v.distance *lots*, I never
saw the -a flag before. Many thanks, Moritz!

Richard

> 
> Moritz
> 



More information about the grass-user mailing list