Skip to content

Commit

Permalink
fix distance matrix k and k-1 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayan committed Jul 26, 2013
1 parent 343696a commit 2398105
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/plugins/fTools/tools/doPointDistance.py
Expand Up @@ -149,6 +149,9 @@ def saveFile(self):
def compute(self, line1, line2, field1, field2, outPath, matType, nearest, progressBar):
layer1 = ftools_utils.getVectorLayerByName(line1)
layer2 = ftools_utils.getVectorLayerByName(line2)
if layer1.id() == layer2.id():
if nearest > 0:
nearest = nearest + 1
provider1 = layer1.dataProvider()
provider2 = layer2.dataProvider()
sindex = QgsSpatialIndex()
Expand Down

0 comments on commit 2398105

Please sign in to comment.