fix_2496.diff
python/plugins/fTools/tools/doPointDistance.py (working copy) | ||
---|---|---|
239 | 239 |
outGeom = outFeat.geometry() |
240 | 240 |
dist = distArea.measureLine(inGeom.asPoint(), outGeom.asPoint()) |
241 | 241 |
if dist > 0: |
242 |
if matType == "Linear": writer.writerow([unicode(inID), unicode(outID), float(dist)])
|
|
242 |
if matType == "Linear": writer.writerow([unicode(inID), unicode(outID), str(dist)])
|
|
243 | 243 |
else: distList.append(float(dist)) |
244 | 244 |
if matType == "Summary": |
245 | 245 |
mean = sum(distList) / len(distList) |
246 | 246 |
for i in distList: |
247 | 247 |
vari = vari + ((i - mean)*(i - mean)) |
248 | 248 |
vari = sqrt(vari / len(distList)) |
249 |
writer.writerow([unicode(inID), float(mean), float(vari), float(min(distList)), float(max(distList))])
|
|
249 |
writer.writerow([unicode(inID), str(mean), str(vari), str(min(distList)), str(max(distList))])
|
|
250 | 250 |
start = start + add |
251 | 251 |
progressBar.setValue(start) |
252 | 252 |
del writer |