[processing] include start point into service area convex hull

This commit is contained in:
Alexander Bruy 2016-12-26 16:39:58 +02:00
parent 567f9208d1
commit 47e5a5fc19
2 changed files with 10 additions and 0 deletions

View File

@ -258,6 +258,11 @@ class ServiceAreaFromLayer(GeoAlgorithm):
feat['start'] = origPoint
writerPoints.addFeature(feat)
upperBoundary.append(startPoint)
lowerBoundary.append(startPoint)
geomUpper = QgsGeometry.fromMultiPoint(upperBoundary)
geomLower = QgsGeometry.fromMultiPoint(lowerBoundary)
geom = geomUpper.convexHull()
feat.setGeometry(geom)
feat['type'] = 'upper'

View File

@ -245,6 +245,11 @@ class ServiceAreaFromPoint(GeoAlgorithm):
del writer
upperBoundary.append(startPoint)
lowerBoundary.append(startPoint)
geomUpper = QgsGeometry.fromMultiPoint(upperBoundary)
geomLower = QgsGeometry.fromMultiPoint(lowerBoundary)
writer = self.getOutputFromName(
self.OUTPUT_POLYGON).getVectorWriter(
fields,