Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 and ArcToolbox. If so what steps did you use.

Thanks in Anticipation, CDB

share|improve this question
3  
I love the irony of augmenting a multi-thousand dollar proprietary software application with OpenSource software... –  DavidF Sep 20 '10 at 14:22

6 Answers 6

up vote 5 down vote accepted

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.

share|improve this answer
1  
Please provide the code you use - if you open it people may even improve the functionality you have. –  johanvdw Dec 22 '10 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 –  Phil Jan 4 '11 at 0:25

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.

share|improve this answer
    
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 Sep 2 '11 at 9:44

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

share|improve this answer

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.

share|improve this answer
    
it's good to have independent verification that it can be done, and why it makes sense, but you leave out the crux: how? –  matt wilkie Sep 21 '10 at 19:28

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.

share|improve this answer
  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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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