3

I perform a fair amount of hydrological processing in QGIS and rely on SAGA's Topographical Wetness Index and slope-derived functions. In order to use them, SAGA demands that input rasters are warped from geographic to projected "meters-on-the-ground".

The problem arises from the fact that a successful operation like "Fill Sinks", "TWI" or "Relative Heights and Slope Positions" always produces a raster that QGIS loads and interprets as geographically projected (e.g. WGS 84).

I've tried setting my project to the projected CRS prior to running any processes but it seems that rasters produced in SAGA need to have their projections manually set in order to be loaded properly by QGIS. I find this particularly strange since SAGA operations typically call for projected rasters to begin with, so loading SAGA-produced rasters as geographically projected seems counterintuitive.

Am I missing an option that should be set within QGIS to enable the creation of a CRS-defining file or do SAGA-produced rasters need to always have their CRS's changed manually?

2

In Settings -> Options -> CRS tab -> CRS for new layers, you might have the default of EPSG:4326 checked.

I suggest to change that to Prompt for CRS, or to the CRS you are usually working in.

  • I usually am using EPSG:4326 so having that set as the default CRS is beneficial 90% of the time. When I'm working on specific areas though, having the option to have QGIS load rasters in the CRS I need by default could come in handy. Thanks for the suggestion. – Trevor J. Smith Jul 28 '16 at 18:32
2

In SAGA if you save the raster using Save to GeoTIFF it will write the projection metadata into the raster for you, assuming it was defined when you imported it; it won't if you use the normal save raster option.

You should then be able to load it into QGIS quite happily. I think if you use the default (.sgrd?) format there's a tool which can assign/embed the projection parameters manually. (Try running the Find and Run tool with 'projection' to find it)

I don't have a working copy of SAGA to hand to check, sadly, but I'm pretty sure the GeoTIFF option will do what you're after.

  • This option might work much better for me. I don't often use SAGA so the few instances I do, it could come in handy to just export that work to SAGA itself. Unfortunately, this doesn't help in performing processes with the model-builder. Not a bad idea though, thanks. – Trevor J. Smith Jul 28 '16 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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