6

I'm trying to learn how to apply the kriging analysis in QGIS using the SEXTANTE plug-in and SAGA tools. It appears that I have my SEXTANTE and SAGA folders configured properly according to the user guide. I've never used a kriging function before and I can't find a good resource from SAGA explaining the different input parameters. Does anyone have experience using the ordinary kriging tool in SAGA that can provide advice or a reference? I'm currently getting the following error message in QGIS:

An error has occured while executing Python code: 
Traceback (most recent call last):   
File "C:/Documents and Settings/PS/.qgis/python/plugins\sextante\gui\ParametersDialog.py", line 137, in accept if self.setParamValues():   
File "C:/Documents and Settings/PS/.qgis/python/plugins\sextante\gui\ParametersDialog.py", line 91, in setParamValue if not self.setParamValue(param, self.paramTable.valueItems[param.name]):   
File "C:/Documents and Settings/PS/.qgis/python/plugins\sextante\gui\ParametersDialog.py", line 129, in setParamValue return param.setValue(widget.getValue())   
File "C:/Documents and Settings/PS/.qgis/python/plugins\sextante\parameters\ParameterExtent.py", line 11, in setValue if value is None: NameError: global name 'value' is not defined

1 Answer 1

6

If you never have run kriging before, you should understand what you are doing. If this is not the case, get a textbook on geostatistics. Anyway, most parameters are there to determine the variogram:

johan@cdh7:~$ saga_cmd libgeostatistics_kriging 5
_____________________________________________
  #####   ##   #####    ##
 ###     ###  ##       ###
  ###   # ## ##  #### # ##
   ### ##### ##    # #####
##### #   ##  ##### #   ##
_____________________________________________

library path:   /usr/lib/saga
library name:   libgeostatistics_kriging
module name :   Ordinary Kriging
author      :   (c) 2008 by O.Conrad
_____________________________________________
go...
Usage: 5 [-GRID <str>] [-VARIANCE <str>] -SHAPES <str> [-FIELD <str>] [-BVARIANCE] [-TARGET <str>] [-MODEL <str>] [-BLOCK] [-DBLOCK <str>] [-BLOG] [-NUGGET <str>] [-SILL <str>] [-RANGE <str>] [-LIN_B <str>] [-EXP_B <str>] [-POW_A <str>] [-POW_B <str>] [-MAXRADIUS <str>] [-NPOINTS_MIN <str>] [-NPOINTS_MAX <str>] [-USER_CELL_SIZE <str>] [-USER_FIT_EXTENT] [-USER_X_EXTENT_MIN <str>] [-USER_X_EXTENT_MAX <str>] [-USER_Y_EXTENT_MIN <str>] [-USER_Y_EXTENT_MAX <str>] [-SYSTEM_SYSTEM_NX <num>] [-SYSTEM_SYSTEM_NY <num>] [-SYSTEM_SYSTEM_X <str>] [-SYSTEM_SYSTEM_Y <str>] [-SYSTEM_SYSTEM_D <str>] [-GRID_GRID <str>] [-GRID_VARIANCE <str>]
  -GRID:<str>               Grid
    Data Object (optional output)
  -VARIANCE:<str>           Variance
    Data Object (optional output)
  -SHAPES:<str>             Points
    Shapes (input)
  -FIELD:<str>              Attribute
    Table field
  -BVARIANCE                Create Variance Grid
    Boolean
  -TARGET:<str>             Target Grid
    Choice
    Available Choices:
    [0] user defined
    [1] grid system
    [2] grid
  -MODEL:<str>              Variogram Model
    Choice
    Available Choices:
    [0] Spherical Model
    [1] Exponential Model
    [2] Gaussian Model
    [3] Linear Regression
    [4] Exponential Regression
    [5] Power Function Regression
  -BLOCK                    Block Kriging
    Boolean
  -DBLOCK:<str>             Block Size
    Floating point
    Minimum: 0.000000
  -BLOG                     Logarithmic Transformation
    Boolean
  -NUGGET:<str>             Nugget
    Floating point
    Minimum: 0.000000
  -SILL:<str>               Sill
    Floating point
    Minimum: 0.000000
  -RANGE:<str>              Range
    Floating point
    Minimum: 0.000000
  -LIN_B:<str>              Linear Regression
    Floating point
  -EXP_B:<str>              Exponential Regression
    Floating point
  -POW_A:<str>              Power Function - A
    Floating point
  -POW_B:<str>              Power Function - B
    Floating point
  -MAXRADIUS:<str>          Maximum Search Radius (map units)
    Floating point
    Minimum: 0.000000
  -NPOINTS_MIN:<str>        Min./Max. Number of m_Points
    Value range
  -NPOINTS_MAX:<str>        Min./Max. Number of m_Points
    Value range
  -USER_CELL_SIZE:<str>     Grid Size
    Floating point
    Minimum: 0.000000
  -USER_FIT_EXTENT          Fit Extent
    Boolean
  -USER_X_EXTENT_MIN:<str>  X-Extent
    Value range
  -USER_X_EXTENT_MAX:<str>  X-Extent
    Value range
  -USER_Y_EXTENT_MIN:<str>  Y-Extent
    Value range
  -USER_Y_EXTENT_MAX:<str>  Y-Extent
    Value range
  -SYSTEM_SYSTEM_NX:<num>   Grid System
    Grid system
  -SYSTEM_SYSTEM_NY:<num>   Grid System
    Grid system
  -SYSTEM_SYSTEM_X:<str>    Grid System
    Grid system
  -SYSTEM_SYSTEM_Y:<str>    Grid System
    Grid system
  -SYSTEM_SYSTEM_D:<str>    Grid System
    Grid system
  -GRID_GRID:<str>          Grid
    Grid (input)
  -GRID_VARIANCE:<str>      Variance
    Grid (optional input)
5
  • 6
    +1 A lot of people like Isaaks & Srivastava. If you are using kriging software without having the knowledge contained in this textbook (at a minimum), then you are not doing kriging, you're just getting into trouble.
    – whuber
    Commented Jun 21, 2012 at 20:01
  • Ha - Yes it's true I am getting into trouble, but at least I'm aware of it :) I'm taking a graduate course in geostatistics next fall and we'll be reading "Geostatistics for Natural Resources Evaluation" by Goovaerts. I'm currently exploring the potential to use QGIS to evalauate groundwater plumes across California for my thesis later in the year. Without knowing much about kriging, at this point I'm just attempting a dry run to see if QGIS and the SEXTANTE-SAGA plugin is a viable option. So with that caveat, if anyone knows of any tutorials for dummies like me, please let me know. Thanks
    – Patrick
    Commented Jun 21, 2012 at 20:53
  • 2
    Goovaerts book is definitely a good one, the courses I took were based on it :-). I'd definitely investigate saga itself first. Your analyses will be much faster in saga than when running it through qgis/sextante. But actually, if it is for a thesis, I would actually recommend jumping into R and gstat. A practical guide to Geostatical mapping would definitely be a good start (you can download it if you are on a budget). [disclaimer: I used R+saga for my PhD]
    – johanvdw
    Commented Jun 21, 2012 at 21:14
  • Great advice, thank you! I just downloaded A Practical Guide to Geostatistical Mapping and it appears to be loaded with all sorts of answers to the many questions looming in my head.
    – Patrick
    Commented Jun 21, 2012 at 23:12
  • I don't think that this is an issue of misunderstanding kriging - I think that this is an issue with the sextante python interface in QGIS. Several sextante bugs (e.g. hub.qgis.org/issues/552) were worked out in May of this year, and look suspiciously like the one Patrick mentions. I am still having this problem, so this answer is not a solution, but it does address the actual problem of sextant error: "global name 'value' is not defined".
    – Rudi
    Commented Jun 24, 2012 at 18:56

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.