Skip to content

Commit

Permalink
[processing] include start point into service area convex hull
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Dec 26, 2016
1 parent 567f920 commit 47e5a5f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/plugins/processing/algs/qgis/ServiceAreaFromLayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ def processAlgorithm(self, progress):
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'
Expand Down
5 changes: 5 additions & 0 deletions python/plugins/processing/algs/qgis/ServiceAreaFromPoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ def processAlgorithm(self, progress):

del writer

upperBoundary.append(startPoint)
lowerBoundary.append(startPoint)
geomUpper = QgsGeometry.fromMultiPoint(upperBoundary)
geomLower = QgsGeometry.fromMultiPoint(lowerBoundary)

writer = self.getOutputFromName(
self.OUTPUT_POLYGON).getVectorWriter(
fields,
Expand Down

0 comments on commit 47e5a5f

Please sign in to comment.