Skip to main content
7 votes

How to sum a hundred of raster maps in GRASS GIS raster calculator

You should consider using r.series. Perhaps something as follows will work in your case: r.series input="`g.list pattern='arc_*' sep=,`" output=arc_sum method=sum
dmci's user avatar
  • 4,902
6 votes
Accepted

Unable to run v.clean in QGIS 3.0.1 in Python console

It appears that it was due to some bug I updated to latest version 3.0.2 of QGIS and modified processing.py to import QgsProcessingFeedback as follows from qgis.core import (QgsMessageLog, ...
Asad Abbas's user avatar
  • 1,634
5 votes
Accepted

How to restore a scarp surface grid to calculate material loss

I will try to address your question with GRASS. Your problem has a first task that is a bit challenging already, which is to get the situation before the event you want to quantify. I think the best ...
Marco's user avatar
  • 3,240
5 votes
Accepted

Correctly import .tif files in GRASS GIS

After importing the dataset into GRASS, you will need to complete two more steps. First, you should set the value of 0 to null. This can be done from the command-line as follows: r.null map=...
dmci's user avatar
  • 4,902
4 votes

GRASS 7 environment setup for Python

I use this export GISBASE="path_to_your GISBASE" export PYTHONPATH="${PYTHONPATH}:$GISBASE/etc/python/" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GISBASE/lib" export GIS_LOCK=$$ export GISRC="/...
gene's user avatar
  • 55.1k
4 votes

How do I download and install r.denoise for GRASS GIS?

From the GRASS shell GRASS 7.1.svn (Geol):~ > g.extension r.denoise Fetching <r.denoise> from GRASS GIS Addons repository (be patient)... Compiling... Installing... Updating addons metadata ...
gene's user avatar
  • 55.1k
4 votes
Accepted

Connecting Python script external to Grass GIS 7 program in Windows 10?

The linked says you need to set environmental variables. This is done in Python using e.g.: import os os.environ['GISBASE'] = "/some/path" The syntax PYTHONPATH = 'C:\OSGeo4W\apps\grass\grass-7.0.4\...
wenzeslaus's user avatar
4 votes

GRASS 7 tools in QGIS results in EPSG:3397 (PD/83 GK4) instead of 31468 (DHDN GK4) causing dislocation

EPSG:31468 and EPSG:3397 share the same projection parameters, but differ in the datum. The first has towgs84 parameters, while the second does not. Your output is a shapefile, and the shapefile ...
AndreJ's user avatar
  • 76.7k
4 votes
Accepted

Getting the 'memory:' layers after grass7:v.clean processing using PyQGIS?

Try replacing memory: with TEMPORARY_OUTPUT. The following code works for me which was executed on a polygon .gpkg file: hn_pg = iface.activeLayer() output = processing.runAndLoadResults( ...
Joseph's user avatar
  • 76k
4 votes
Accepted

Field name for stats to be calculated not appearing using v.vect.stats

Area (ha) field is string because it is left aligned in the attribute table. You should convert into a numeric one. Open "Field Calculator" to create a new Area field. Select Decimal number (...
Kadir ┼×ahbaz's user avatar
3 votes
Accepted

Missing the results from grass tools when used in python console

If you're using GRASS 7, you will need to use grass7:v.buffer.distance instead of grass:v.buffer.distance. So try using the following: result = processing.runalg('grass7:v.buffer.distance', part1,'...
Joseph's user avatar
  • 76k
3 votes
Accepted

GRASS 7 environment setup for Python

Once a python script is running, changes to environment variables are no longer effective. They are set up right before runtime and the interpretor will not update them afterwards. PYTHONPATH can be ...
Luís de Sousa's user avatar
3 votes

r.patch results in a blank map in GRASS

One suggestion would be to ensure that the computational region is correctly set, i.e.: g.region rast=tile1,tile2,tile3,...,tilen -p Then you should run the r.patch command: r.patch input=tile1,...
dmci's user avatar
  • 4,902
3 votes
Accepted

GRASS - Aligning grids of different rasters

I'll try to answer even though this was a few years ago. I suspect that the two rasters are misaligned because the GRASS region was slightly different when you imported the NDVI and LANDSCAPE rasters. ...
Lou-gazi's user avatar
3 votes

QGIS 2.18 Windows 10, 32 bit system - where is the GRASS plugin?

The GRASS plugin is available when you open QGIS Desktop with GRASS instead of QGIS Desktop.From the plugin then you can access GRASS.
Kelvin Munene's user avatar
3 votes
Accepted

Grass projection issue

So researching for my issue I came across an old github repository filled with lectures on how to do a Supervised Classification https://github.com/FOSS4GAcademy/GST105FOSS4GLabs/blob/master/Module%...
Ka_Papa's user avatar
  • 447
3 votes

Qgis 2.18.1 text under a degree angle (Grass 7.0.5)

You can find the option in the layer's properties label tab, you need to check 'Label this layer' at the top and choose your name field, then: Layer properties -> 'label' tab -> 'placement' tab ...
geozelot's user avatar
  • 30.4k
3 votes
Accepted

Issue with GRASS i.tasscap

It looks like you have not set the GRASS region correctly. After importing your data, you need to set the region to the extent and resolution of one of your bands, e.g.: g.region rast=B2 and then ...
dmci's user avatar
  • 4,902
3 votes
Accepted

Copying Grass data from one location to another in Grass GIS

Here an overview as it depends on the projection(s): When the projection is the same across the different locations, then you either can simply copy/move the respective mapset in location A to ...
markusN's user avatar
  • 13k
2 votes

'Add GRASS vector layer' button in QGIS 2.16.2 with GRASS 7.0.4?

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
Joseph's user avatar
  • 76k
2 votes

Which basename i am going to use as prefix in i.landsat8.swlst in GRASS GIS?

I found the answer to this query. Say, we are going to calculate LST for Landsat8 scene (LC81470372015290LGN00_B2), The Basename we are going to use for prefix in above mentioned command is: ...
John's user avatar
  • 81
2 votes
Accepted

GRASS r.in.wms: HTTP Error 505

I just tried and the problem is the layer name. Grass gis has problems with the space in the layer name. It does work when you input the layer name as "Egeos%202011". Substituting the space (%20) or ...
Matte's user avatar
  • 6,255
2 votes
Accepted

GRASS New/Open Mapset not available ( QGIS 2.18.7) on Mac OS

I fixed this by changing my Custom path to: /Applications/QGIS.app/Contents/MacOS/grass7
Beardsley's user avatar
  • 435
2 votes
Accepted

First time using i.segment.uspo in GRASS

At first set you region of interest with this command: g.region -d vector=myregion@name_of_grasssession save=myregion1 This command creates region of interest bordered with vector layer placed in ...
Irij's user avatar
  • 76
2 votes

GRASS 7.2.1 r.denoise/mdenoise error Windows 10

According to the mdenoise page (http://personalpages.manchester.ac.uk/staff/neil.mitchell/mdenoise/) you need to compile it yourself on Linux which requires a C++ compiler. Then install the resulting ...
markusN's user avatar
  • 13k
2 votes
Accepted

standalone script using grass7:v.clean gives erro

I think you need to specify the GRASS_REGION_PARAMETER as extents, e.g., processing.runalg("grass7:v.clean", BK3, 2, dgarc, "%f , %f, %f, %f "% (...
user55937's user avatar
  • 1,293
2 votes
Accepted

GRASS 7 tools in QGIS results in EPSG:3397 (PD/83 GK4) instead of 31468 (DHDN GK4) causing dislocation

I think it's good news that in 2.18.17 I did not observe the above mentioned dislocation. Assume you are using GRASS 7 algorithms from either graphical modeler or with PyQGIS processing module you ...
Eva Großmann's user avatar
2 votes

Adding GRASS module to QGIS 2.18.21

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
user127368's user avatar
2 votes
Accepted

d.rast.edit not yet implemented in the WxGUI

You can open it with d.rast.edit --ui A related ticket is now open: https://trac.osgeo.org/grass/ticket/3711 in order to get rid of the error message you received.
markusN's user avatar
  • 13k
1 vote

r.maxent.lambdas command not recognized in GRASS after installing extension

The installation fails on Windows because r.maxent.lambdas is a shell script and not a Python script. The options are rewrite it using Python (perhaps contact the author?) use a non-Windows operating ...
markusN's user avatar
  • 13k

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