1

I am working on stream network delineation with GRASS 7 in RQGIS, the 'r.stream.extract' algorithm in particular. However, the algorithm returns erroneous result when the Advanced parameter, "v.out.ogr output type" has not been defined as "line". The advanced parameters setting is accessible in the QGIS GUI ver 2.14.17 (as shown below)

enter image description here

but couldn't be found as argument in RQGIS.

enter image description here

I wonder if there is anything that I have missed. Is there any workaround to solve this?

  • Try setting GRASS_OUTPUT_TYPE_PARAMETER as 2. The options from the GUI are seen as index values: auto = 0; point = 1; line = 2; and area = 3. – Joseph Aug 14 '17 at 11:57
  • Nice one! Glad you got it working :) – Joseph Aug 28 '17 at 9:01
1

Joseph has already told you the correct answer. But just to make it clear. To find out about possible values for a specific parameter, run get_usage(). In your case run:

get_usage("grass7:r.stream.extract")

This results in:

ALGORITHM: r.stream.extract - Stream network extraction
elevation <ParameterRaster>
  accumulation <ParameterRaster>
  depression <ParameterRaster>
  threshold <ParameterNumber>
  mexp <ParameterNumber>
  stream_length <ParameterNumber>
  d8cut <ParameterNumber>
  GRASS_REGION_PARAMETER <ParameterExtent>
  GRASS_REGION_CELLSIZE_PARAMETER <ParameterNumber>
  GRASS_OUTPUT_TYPE_PARAMETER <ParameterSelection>
  stream_raster <OutputRaster>
  stream_vector <OutputVector>
  direction <OutputRaster>


GRASS_OUTPUT_TYPE_PARAMETER(v.out.ogr output type)
0 - auto
1 - point
2 - line
3 - area

So setting GRASS_OUTPUT_TYPE_PARAMETER to 2 ("line" should also work), as pointed out by Joseph, should do what you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.