0

--Running with configuration is Mac OS X 10.11.6 (El Capitan), QGIS 2.14.7-Essen, SAGA 2.2.3-- I'm hoping that someone knows what the fix is for the failure I'm encountering in the SAGA tool.

I'm following the instructions in the QGIS Training Manual (http://docs.qgis.org/2.14/en/docs/training_manual/vector_analysis/spatial_statistics.html), Section 7.4.11 for running SAGA's Minimum Distance Analysis tool. Instead of a result, the GUI reports a failure in the SAGA run with a Segmentation Fault 11. The GUI states that the Minimum Distance Analysis layer was not correctly generated. Just to note in case the projection is pertinent, the random points used in the analysis are in the WGS 84/UTM zone 34S projection.

/Users/xxxxx/.qgis2//processing/saga_batch_job.sh: line 3: 1625 Segmentation fault: 11 saga_cmd statistics_points "Minimum Distance Analysis" -POINTS "/var/folders/w5/0qqndryj29587bhbbt_wxx1w0000gn/T/processing8e4aa8219d5c48cfbc84b90c68593311/1485958248.417.shp" -TABLE "/Users/xxxxx/Downloads/junk.csv"
Converting outputs
Loading resulting layers

The following layers were not correctly generated.
Minimum Distance Analysis
You can check the log messages to find more information about the execution of the algorithm

I reran the tool via the command line to see if I could find more information. (See below.) The only additional clue I see is something about "Load shapes".

/Applications/QGIS.app/Contents/MacOS/bin/saga_cmd statistics_points "Minimum Distance Analysis" -POINTS "/var/folders/w5/0qqndryj29587bhbbt_wxx1w0000gn/T/processing8e4aa8219d5c48cfbc84b90c68593311/1485958339.968.shp" -TABLE "/Users/xxxxx/Downloads/junk.csv"
____________________________

   #####   ##   #####    ##
  ###     ###  ##       ###
   ###   # ## ##  #### # ##
    ### ##### ##    # #####
 ##### #   ##  ##### #   ##
____________________________

SAGA Version: 2.2.3

____________________________
library path:   /Applications/QGIS.app/Contents/MacOS/lib/saga/
library name:   libstatistics_points
library     :   Points
tool        :   Minimum Distance Analysis
author      :   O.Conrad (c) 2010
____________________________

Load shapes: /var/folders/w5/0qqndryj29587bhbbt_wxx1w0000gn/T/processing8e4aa8219d5c48cfbc84b90c68593311/1485958339.968.shp...

Segmentation fault: 11
3
  • You have a problem with your shapefile /var/folders/w5/0qqndryj29587bhbbt_wxx1w0000gn/T/processing8e4aa8219d5c48cfbc84b90c68593311/1485958339.968.shp
    – gene
    Commented Feb 1, 2017 at 17:00
  • I've created the shape file following the instructions in the training manual (Section 7.4.1 and onward of link stated above). The attribute table opens without a problem. Do you know how I can determine what is wrong? 1) Started with a vector layer and a raster layer, 2) Used the Vector ‣ Geoprocessing Tools ‣ Convex hull(s) tool to generate an area enclosing my vector layer, 3) Created random points in this area using the tool at Vector ‣ Research Tools ‣ Random points, 4) Used Minimum Distance tool in the Processing Toolbox. Maybe there is an EOL incompatibility with a Mac??? Commented Feb 2, 2017 at 3:25
  • Possibly related to gis.stackexchange.com/questions/217414/…
    – pat-s
    Commented Mar 9, 2017 at 13:29

2 Answers 2

1

The problem is that /var/folders/w5/0qqndryj29587bhbbt... is a temporary folder (hidden folder) whose goal is not to conserve data (temporarily only) and maybe this folder is empty when you try to use it.

Try to apply the saga_batch_job.sh script to shapefiles with "normal" paths

saga_cmd statistics_points "Minimum Distance Analysis"  -POINTS "/Users/me/notebooks/pondr/pondrpts.shp" -TABLE "junk.csv"

for example

Result

____________________________
library path:   /Applications/QGIS.app/Contents/MacOS/lib/saga/
library name:   libstatistics_points
library     :   Points
tool        :   Minimum Distance Analysis
author      :   O.Conrad (c) 2010
____________________________

Load shapes: /Users/me/notebooks/pondr/pondrpts.shp...

100%okay
Parameters
Points: pondrpts
Minimum Distance Analysis: Minimum Distance Analysis
100%
100%Save table: junk.csv...
81%okay
1

I faced the same issue for all QGIS versions installed via homebrew (osgeo4mac) tap. The Kyngchaos QGIS binary, which comes with SAGA 2.2.3, works for me.

I then tried different SAGA versions using the osgeo4mac installation way by manipulating the formula:

  • SAGA 2.2.2 -> segfault error

  • SAGA 2.2.3 -> segfault error

  • SAGA 3.0.0 -> working

  • SAGA 4.0.1 -> working

I used the "Slope Aspect Curvature" algorithm for testing.

There is a open PR which adds SAGA formulas. If you want to try it out immediately, just do brew install https://raw.githubusercontent.com/pat-s/homebrew-osgeo4mac/saga-test/Formula/saga4.rb.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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