[GRASS-user] Re: [Qgis-user] Nearest neighbour analysis

Kurt Springs ferret_bard at mac.com
Tue Dec 7 21:36:25 EST 2010


These are separate layers with no duplicate points.  I have tried it with several layers, in multiple projects.  Only one gave results, and that was relatively quickly.  I the coordinates in sqlite, there should be no distance of zero.

[later]

As I wrote this, I decided to do some experimenting.  I found something interesting.  Normally I use GRASS for a lot of my analysis.  I then in qgis, I just add GRASS vector or raster layers.  It seems that is the problem.  Occasionally a layer works (usually my wedge tombs), but mostly not.  However, I tried some shape files that I down loaded, and it works fine.  So, I exported the GRASS vectors to shape files and it works fine, even with layers that didn't work before.  So the solution is to export from GRASS to ESRI Shape then open the shape file in qgis.  BTW don't try to export a GRASS vector file from qgis.  It doesn't seem to work.  You have to export from GRASS.

This observation didn't seem to have anything to do with the database.  The GRASS vectors are mostly sqlite now, but some of my older ones are dbf.  The problem seems to be the GRASS vectors themselves.

Thanks Carson.

Kurt

On Dec 7, 2010, at 5:46 PM, Carson Farmer wrote:

> Does the layer you were testing with have any duplicate points (i.e.
> neighbours with zero distanace)? I wouldn't think this should matter,
> but it might? Have you tried it with other layers (rather than just
> subsets of the same layer)?
> 
> Carson
> 
> On 7 December 2010 20:03, Kurt Springs <ferret_bard at mac.com> wrote:
>> I use OS X 10.6.5,  and William Kyngesburye's Qgis 1.6.0-1 and GDAL Complete 1.7.
>> 
>> Kurt
>> On Dec 7, 2010, at 2:53 PM, Carson Farmer wrote:
>> 
>>> Hi Kurt,
>>> 
>>>> I've been playing with some of Qgis's vector analysis tools.  Has anyone tried using the Nearest neighbour analysis, under Vector=>Analysis Tools?  I have tried it and after seeing the black and white wheel for a while, nothing happens.  How long should it take, depending on the population size?  I've tried populations as small as five and bigger.
>>> I just tested this using the 'popp' point layer from the vmap0 QGIS
>>> sample data, and it ran in about 1 second (incidentally, the nearest
>>> neighbour index turns out to be 0.4 for this dataset). I also tested
>>> it with larger and smaller layers and all seemed fine. Which OS and
>>> version of QGIS & GDAL are you running?
>>> 
>>> Carson
>>> 
>>> --
>>> Carson J. Q. Farmer
>>> ISSP Doctoral Fellow
>>> National Centre for Geocomputation
>>> National University of Ireland, Maynooth,
>>> http://www.carsonfarmer.com/
>> 
>> 
> 
> 
> 
> -- 
> Carson J. Q. Farmer
> ISSP Doctoral Fellow
> National Centre for Geocomputation
> National University of Ireland, Maynooth,
> http://www.carsonfarmer.com/



More information about the grass-user mailing list