9

I have been having a look at SAGA (http://www.saga-gis.org/en/index.html) and it seems to have some nice tools for geoprocessing.

I was wondering if anyone out there has had any luck bringing SAGA Modules (python) into ArcGIS Desktop and ArcToolbox.

If so what steps did you use?

1
  • 3
    I love the irony of augmenting a multi-thousand dollar proprietary software application with OpenSource software...
    – DavidF
    Commented Sep 20, 2010 at 14:22

7 Answers 7

5

To get ArcGIS talking to SAGA we build simple toolboxes that create and run .bat files from a temporary location. That runs the SAGA module through the commandline interface. Generally the toolbox will need to convert data formats, resolve projection issues etc before and after running the SAGA function but that is pretty straightforward. The first one is the hurdle but then it's just a case of adapting it as you need to connect to additional SAGA modules. Of course, once you have the toolbox it can be reused in more complex workflows through modelbuilder or in python.

2
  • 1
    Please provide the code you use - if you open it people may even improve the functionality you have.
    – johanvdw
    Commented Dec 22, 2010 at 13:54
  • 1
    If I get a chance I'll build a generic case and then make the code for that available. At the moment each is coded to a specific task so not the helpful without a little bit of additional work first Commented Jan 4, 2011 at 0:25
4

To be honest, it appears as though SAGA depends heavily on other OpenSource projects for the processing functionality (e.g. GRASS, gdal, proj.4, etc.)

It might be much more simple to install QGIS Desktop GIS and then write a QGIS Python Plugin(s) to do what you would like to do. You would likely have programmatic access to much of the functionality available trough SAGA.

On a side note, even though SAGA is licensed under the GPL, I don't think that you would have any legal issues with writing a script that combined ESRI and SAGA code, but there could possibly be issues with publishing the code to ArcScripts.

1
  • The processing functionality actually does not realy on many other open source projects. Only file import/export and projections, but those are most likely not the tools which you want to use from arcgis.
    – johanvdw
    Commented Sep 2, 2011 at 9:44
2

There are some efforts to run saga modules in arcgis through sextante: http://sextantegis.blogspot.com/2011/08/here-is-another-video-of-sextante-on.html

1

We do just that at: www.frogtech.com.au

The point is to get functionality similar to that which is tied down through extensions or license levels in ArcGIS Desktop... no point paying thousands for an extension when you only use one or two of it's functionality, then we can get our less specialist GIS users to roll that tool through a regular workflow, we customise to allow inputs/ outputs to be from our regular workflows too.

1
  • it's good to have independent verification that it can be done, and why it makes sense, but you leave out the crux: how? Commented Sep 21, 2010 at 19:28
1

A more lightweight approach: use the rpy/rpy2 (for Python) and RSAGA (for R) packages to make the ArcGIS-to-Python-to-R-to-SAGA connection. I'm dabbling in this now. It takes some time, but it can be done.

Of course, that means you'd need to have ArcGIS/Python, R, and SAGA all installed under compatible versions. But hey, nothing good comes easily.

1
  1. write a python script which does your work in saga e.g. import
    saga_api, sys.argv etc.; keep in mind saga does most of the things in memory and you need to get data imported and exported from disk
  2. test, test, test your saga python script
  3. arcgis -> go to arctoolbox
  4. create new model -> right click add script - link to the script in step 1 , dont forget to specify your arguments. (Remember Version10 save to to 9.3 and lower looses/garbles arguments so they need to be redefined sometimes)
  5. ready to go
0

Note that since version 2.2.1 SAGA supports toolboxes which can be run from arcgis: https://sourceforge.net/p/saga-gis/news/2015/09/saga-221-released/

" To run ArcSAGA tools, you have to navigate to your SAGA installation directory with the ArcCatalog control and open the ArcSAGA Python toolboxes. It should work out of the box without any further installation steps. "

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.