8

For cropping a raster map according to a vector map, you can use r.mask which also supports vector maps. Update 2018: Meanwhile there are v.clip and a new Addon available: r.clip


8

Ok, this is slightly embarrassing but I'll post the answer here anyway in case someone is as blind as I was. Apparently, there are two QGIS executable files: C:\OSGeo4W64\bin\qgis-bin.exe and C:\OSGeo4W64\bin\qgis-bin-g7.4.1.exe. In Windows, when firing up a program via the Windwos startup button, it runs qgis-bin.exe by default and GRASS does not work. When ...


7

GRASS 7 is not compatible with QGIS 2.8. You can follow the development of the new GRASS plugin on http://www.gissula.eu/qgis-grass-plugin-crowdfunding/progress.html. For 2.8, you will need to install GRASS 6.x.


6

I have this problem with the 64bit version. Grass 7.0.5 is a recent release, like less than a week. QGIS and the GRASS 7 plugin haven't been updated to catch up - e.g. if you look at the batch file launchers in \bin you'll see they all refer to 7.0.4. What you need to do is launch the OSGeo4W setup, go to Advanced Install, navigate to the package list, and ...


6

I have figured this out and thought it best to post the answer for future users. Firstly, I right clicked on my QGIS application and selected 'Show Package' to show the subfolders within the application (apologies if this is obvious to most users but it wasn't to me!) In doing this I managed to locate the exact path of my GRASS installation, which is /...


5

There are some syntax errors. If you run this code from the Python Console: import processing processing.alghelp("grass7:r.reclass") you will get: ALGORITHM: r.reclass - Creates a new map layer whose category values are based upon a reclassification of the categories in an existing raster map layer. input <ParameterRaster> rules <...


4

The r.water.outlet needs the outlet coordinates in the same CRS as the input file. Since your "computational region is North:1570225.7, East:739499.1, South:1319713.3, west:474246" and in your screen shot says "EPSG: 32643 (OTF)" means your are mixing units. The outlet point should be meters as CRS and not in lon/lat. My screen is a bit different from your ...


4

You could create a new description file in your C:/Program Files/QGIS 2.18/apps/qgis/python/plugins/processing/algs/grass7/description directory (or wherever you installed it) and add the parameters used by the tool. Create a new text file and use the following: v.out.ogr Exports a vector map layer to any of the supported OGR vector formats. Vector (v.*) ...


3

Your result has sense since there is no threshold for interior drianage basins. Here I am quoting the man page of GRASS 7.4 link: Basin threshold The minimum size of drainage basins, defined by the threshold parameter, is only relevant for those watersheds with a single stream having at least the threshold of cells flowing into it. (These watersheds are ...


3

A late answer: QGIS 2.14 is compatible with GRASS 7 now. On Windows, the standalone installer provides separate icons for GRASS 7.0.3 integration. For GRASS 6.4.3 support, you have to stick to QGIS 2.12 or older. Windows versions can be installed in parallel without harm. On Linux, you have the option to choose support for GRASS 6 in the debian packages, ...


3

The GRASS plugin is available when you open QGIS Desktop with GRASS instead of QGIS Desktop.From the plugin then you can access GRASS.


3

Have you used the Advanced Install option in OSGeo4W to make sure msys and GRASS 7 are both installed? I usually run the express install first, then go back into Setup, tick over to Advanced Install, and grab any extra bits and pieces I like to use. My GRASS 7 path is C:\OSGeo4W64\apps\grass\grass-7.0.4 GRASS 7 commands work for me but not GRASS ...


2

g.gisenv set="GRASS_ADDON_BASE=pathtoyouraddondirectory" should do what you are after! Note that the default setting is: "The default (...) on MS Windows $APPDATA\GRASS7\addons!" See: https://grass.osgeo.org/grass70/manuals/g.gisenv.html https://grass.osgeo.org/grass72/manuals/variables.html


2

I think that button has been depreciated for some time. You can follow the instructions described in: Loading GRASS raster and vector layers Importing data into a GRASS LOCATION via drag and drop


2

I found a solution! Hope it helps others. First thing was to find out what the real problem is. I would think that the problem is likely that I ended up having repositories (somehow changed them in between updates to QGIS) which leads me to have GRASS 7 installed with a QGIS version trying to use a qgis-grass-plugin for GRASS 6... See the question and ...


2

http://qgis.org/debian/dists/trusty/main/binary-i386/Packages only contains packages for grass6, while http://qgis.org/ubuntugis/dists/trusty/main/binary-i386/Packages supports grass7 only. You might have to compile QGIS from source, or remove the debian packages from your Linux, and switch to the ubuntugis ones. While this works for trusty (and Linux Mint ...


2

I know it's late, but for others who have the same question. Please try this: # limit your computational region to polygon_vector r.mask vect=polygon_vector # clip big_raster to polygon_vector (MASK set by r.mask above) r.mapcalc ex=clipped_raster=big_raster # export r.out.gdal input=big_raster output=clipped_raster.tif


2

I think your procedure is somewhat backwards. First you create the mapset. Then you load the DEM into that mapset (r.in.gdal command). Then run the r.lake command. BTW, working in an undefined projection is certainly going to lead you into trouble. What is the coordinate reference system of your DEM? You should (must?) begin by creating a location that ...


2

Not sure how to get it to work from the Processing Toolbox but instead, you could use the same tool from GRASS Tools. You can do this by: Running your QGIS Desktop 2.x.x with GRASS 7.x.x. Then from the menubar, go to: Plugins > GRASS > Open Mapset Or click New Mapset to create a new one where you define a directory to store layers imported into ...


2

I'm one of the v.in.dxf developers. I tried your DXF file and the module worked fine. By default, this module imports all layers into multiple layers in a new vector map. v.in.dxf found 85 layers in your DXF file and imported them into 85 different layers (dblinks in GRASS terms). I think what happened is when QGIS imported back the 85 layers from GRASS into ...


2

I don't think the tool is listed in the toolset. But you should still be able to access the g.remove module from the GRASS shell and use the command prompt with something like: g.remove type=vector name='myVectorMap'


2

resolved this creating a .bat file with the line @"%GRASS_PYTHON%" "%GISBASE%/scripts/r.out.haralickFeatures.py" %* in the directory: C:\OSGeo4W64\apps\grass\grass-7.4.0\bin


2

You should have a look at i.vi - Calculates different types of vegetation indices Installed via QGIS 2.18.25/ Osgeo4W installer and in the toolbox panel (here in french) One the indices is NDVI arvi: Atmospherically Resistant Vegetation Index dvi: Difference Vegetation Index evi: Enhanced Vegetation Index evi2: Enhanced Vegetation Index 2 gvi: Green ...


2

As a general hint, you can search functionality in the GRASS GIS documentation with g.search.modules. To your question: maybe the "sinuous: line sinuousity, calculated as line length / distance between end points" functionality of v.to.db may help to approximate this value. Overall, to reduce the curve sharpness, you can generalize the vector lines with v....


2

Your code have several issues. I fixed them in following code but with only two raster layers (for time processing reasons): import processing import os path = '/home/zeito/Desktop/INPUT' output = '/home/zeito/Desktop/OUTPUT' bandList = [band for band in os.listdir(path) if band[-4:]=='.tif'] #I changed for 'tif' input = [ os....


1

This is a known bug and has been fixed in QGIS master. The fix will be available in the KyngChaos QGIS 3 app package in due course.


1

The easiest way is to write all these commands to a text file (e.g. "yourscript.sh") and run it using the --exec parameter: grass74 -c yourgeofile.tif -e /path/to/grassdata/test1/ grass74 /path/to/grassdata/test1/PERMANENT/ --exec sh yourscript.sh For an example, see also here: https://grass.osgeo.org/grass74/manuals/grass7.html#batch-jobs-with-the-exec-...


1

welcome to the wonderful world of GRASS. The first thing I can think of that you have installed GRASS separately as v. 7.4.1 and installing the v.centerline there? Usually, QGIS 2.18 comes with GRASS 7.2 as built in with it, at least that is how it is installed in my system. You can check it by opening the GRASS shell (Marked as 1 in the first screenshot) ...


1

The second error can be for not installing the required framework beforehand. Please see the answer in QGIS GRASS Processing Not Working on MacOS post which has two more references to consult.


1

Not sure if it answers your question, but some observations. Bad news first of all, I could not reproduce your issue in QGIS 2.18.11 and QGIS 2.14.17 LTR, both GRASS 6 and 7. Any import worked fine (see screenshots below). The only difference between QGIS 2.14.17 and 2.18.11 is that in QGIS 2.18.11 the 'List of Layers to import' seems mandatory and cannot ...


Only top voted, non community-wiki answers of a minimum length are eligible