[Qgis-user] Distance calculation Matrix

Jonathan Moules jonathanmoules at warwickshire.gov.uk
Wed Nov 20 04:20:05 PST 2013


Hi Sergio,
I ended up getting the SAGA one to work by re-starting QGIS.

The one you're referencing was the first I tried and gave me either no
output or any indication anything had been done, or a Python error.
Apparently it has been fixed in master though.
Thanks,
Jonathan


On 20 November 2013 12:08, Sergio Vignali <vignalisergio30 at gmail.com> wrote:

> Hi Jonathan,
> there is another tool,
> did you try with Vector -> Analysis Tools -> Distance matrix?
>
> Regards
>
>
> 2013/11/20 Jonathan Moules <jonathanmoules at warwickshire.gov.uk>
>
>>  Hi List,
>> I have a collection of ~2,500 points in British National Grid. I want to
>> calculate the distance between all of them to all of them.
>> QGIS 2 has two tools for this as best I can tell:
>>
>> Processing -> "Distance matrix"
>> Results:
>>
>> - "Linear" matrix type: Nothing happens whatsoever. No errors, no
>> outputs, nothing. The dialog just disappears.
>>
>> - "Standard" matrix type: I get a wall of Python error message:
>>
>>> Traceback (most recent call last):
>>> File
>>> "C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\processing\core\GeoAlgorithm.py",
>>> line 150, in execute
>>> self.processAlgorithm(progress)
>>> File
>>> "C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\processing\algs\ftools\PointDistance.py",
>>> line 98, in processAlgorithm
>>> self.regularMatrix(inLayer, inField, targetLayer, targetField, nPoints,
>>> progress)
>>> File
>>> "C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\processing\algs\ftools\PointDistance.py",
>>> line 178, in regularMatrix
>>> data.append(unicode(outFeat.attributes[outIdx]))
>>> TypeError: 'builtin_function_or_method' object has no attribute
>>> '__getitem__'
>>
>>
>>  Summary: Absolutely nothing happens again
>>
>>
>> =========
>> There's also a SAGA tool "Distance matrix". With this one I get an error
>> like:
>>
>>  The following output layers could not be open
>>> Distance Matrix Table:
>>> C:\Users\jmou1\AppData\Local\Temp\processing\cb88ea8b51994f1cbfe5549465bc949f\TABLE.csv
>>
>>
>> Despite it being a location I can write to. That's using the temporary
>> output. If I specify an output location myself, I get the same error.
>>
>>
>> So basically, it's not working; can anyone advise what I'm doing wrong?
>> How do I use these tools? I've got three different failure modes here,
>> which isn't very encouraging.
>>
>> Cheers,
>> Jonathan
>>
>> This transmission is intended for the named addressee(s) only and may
>> contain sensitive or protectively marked material up to RESTRICTED and
>> should be handled accordingly. Unless you are the named addressee (or
>> authorised to receive it for the addressee) you may not copy or use it, or
>> disclose it to anyone else. If you have received this transmission in error
>> please notify the sender immediately. All email traffic sent to or from us,
>> including without limitation all GCSX traffic, may be subject to recording
>> and/or monitoring in accordance with relevant legislation.
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
>
>
> --
> Sergio Vignali
>
>

-- 
This transmission is intended for the named addressee(s) only and may 
contain sensitive or protectively marked material up to RESTRICTED and 
should be handled accordingly. Unless you are the named addressee (or 
authorised to receive it for the addressee) you may not copy or use it, or 
disclose it to anyone else. If you have received this transmission in error 
please notify the sender immediately. All email traffic sent to or from us, 
including without limitation all GCSX traffic, may be subject to recording 
and/or monitoring in accordance with relevant legislation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20131120/791b9d4f/attachment.html>


More information about the Qgis-user mailing list