[Qgis-developer] (Yet again) SAGA support badly broken in QGIS

Johan Van de Wauw johan.vandewauw at gmail.com
Thu Jun 2 06:08:24 PDT 2016


> On Wed, Jun 1, 2016 at 2:16 PM, Neumann, Andreas <a.neumann at carto.net>
> wrote:
>>
>> If you guys think about integrating SAGA closer into QGIS, could we also fix
>> the issue that SAGA is currently limited to reading Shapefiles for vector
>> input? Probably a lot of work - but would this be feasible?
>
> After last year's hackfest in Nodebo just out of curiosity I was
> looking at the feasibility of replacing SAGA's native shapefile
> support by OGR. IMHO it is feasible - not something for a rainy
> afternoon, but maybe a project for 2-3 weeks of developer time. All
> work with shapefiles is done by API calls to saga core, so it would be
> a matter of reimplementing a part of the API. Similarly, raster access
> could be adapted to use GDAL. We could even use directly QGIS API for
> vector/raster access if we chose even tighter integration.

SAGA already can use OGR instead of just shapefiles. By using the
module io_gdal you can load a file through OGR into memory, do your
analysis and save using the same module to any ogr file.
It does not have to be a shape file. In the gui, try dragging and
dropping an OGR supported file on saga or go through
geoprocessing>file>gdal/ogr import.

The same thing is true for raster files. There is not much error
handling if you try exotic formats, but when used correctly it works.

It will still load everything in memory again. Directly using the QGIS
api will be harder (especially when changes are made), but there are
not too many things you can do with vector/raster data. I guess most
of the required methods are probably implemented.

>
> I think integrating SAGA tightly into QGIS would be very beneficial
> for both projects:
> - QGIS would finally have a native analysis engine, ending the long
> time struggle with changing parameter names, data conversions, CRS
> issues, algorithm naming (e.g. raster vs grid), duplication of
> algorithms etc.
> - SAGA source code would get more eyes of developers (increasing
> quality and bringing in new algorithms) and users. SAGA devs could
> focus more on algorithms as GUI side would be handled by QGIS.

Best first step would be including saga-gis-developer list in this thread.

Kind Regards,
Johan


More information about the Qgis-developer mailing list