1

I am using qgis 2.4 and i am looking for the "easiest" way to execute e.g. the r.in.gdal function from the python console in qgis.

Specifically for r.in.gdal, I could not found this function in processing module (i.e. import processing; processing.alglist('r.in')), thus, processing module seems not to be the way to go ?!?

Before executing a grass command the mapset needs to be opened. Which command does this job?

asked Oct 29, 2014 at 17:27

1 Answer 1

1

r.in.gdal is a command to import rasters into GRASS GIS, not into QGIS

There are two options to use GRASS GIS in QGIS:

1) with the grass plugin

  • you are working in GRASS GIS and you can use r.in.gdal in the Python console of GRASS GIS to import a raster into a Location/Mapset.

2) from processing

  • you are working in QGIS with a "virtual" Location/Mapset that has nothing to do with the Location/Mapset of 1), therefore r.in.gdal is useless -> use the the PyQGIS solution in the Python console of QGIS

You can also use osgeo.gdal to import a raster into a GRASS GIS Location/Mapset.

answered Oct 29, 2014 at 18:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.