Skip to content
Permalink
Browse files

after review

  • Loading branch information
ghtmtt committed May 15, 2019
1 parent 4ca3935 commit b3a8d8f3a3abc514d3675117593bfefd5919139f
Showing with 6 additions and 4 deletions.
  1. +2 −3 python/plugins/processing/algs/help/qgis.yaml
  2. +4 −1 python/plugins/processing/algs/qgis/Climb.py
@@ -56,10 +56,9 @@ qgis:checkvalidity: >
qgis:climbalongline: >
This algorithm calculates the total climb and descent along line geometries.

It works only if the line layer already has Z values on the vertex. If it does not, consider using the Drape (set z-value from
raster) algorithm.
It works only if the geometries have Z values. If it does not, and you have a DEM, you can use the Drape (set z-value from raster) algorithm to add Z values.

The output layer is a copy of the input layer with some additional fields that represent the total climb, total descent, the minimum elevation and the maximum elevation.
The output layer is a copy of the input layer with additional fields that contain the total climb, total descent, the minimum elevation and the maximum elevation for each line geometry. If the input layer contains fields with the same names as these added fields, they will be overwritten.

qgis:clip: >
This algorithm clips a vector layer using the polygons of an additional polygons layer. Only the parts of the features in the input layer that falls within the polygons of the clipping layer will be added to the resulting layer.
@@ -135,7 +135,7 @@ def processAlgorithm(self, parameters, context, feedback):
hasZ = QgsWkbTypes.hasZ(source.wkbType())

if not hasZ:
feedback.reportError(self.tr('The layer has not Z values. Please use the Drape algorithm with a DEM layer to extact the Z value.'))
feedback.reportError(self.tr('The layer does not have Z values. If you have a DEM, use the Drape algorithm to extract Z values.'))
return

thefields = QgsFields()
@@ -195,6 +195,9 @@ def processAlgorithm(self, parameters, context, feedback):
zval = 0
for v in part.vertices():
zval = v.z()
if math.isnan(zval):
feedback.pushInfo("Missing Z value")
continue
if first:
prevz = zval
minelev = zval

0 comments on commit b3a8d8f

Please sign in to comment.
You can’t perform that action at this time.