9

I got the same problem using the Osgeo installer, but I just managed to solve it. First download this https://sourceforge.net/projects/mingw/?source=typ_redirect Install it, look for msys-base package and install it. Set the path to msys in QGIS to "C:\MinGW\msys" or what ever local drive it was installed on and the Grass algorithms should work fine.


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.


7

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


6

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, QgsApplication, QgsMapLayer, QgsProcessingProvider, QgsProcessingAlgorithm, ...


5

So here's the deal: QGIS 2.14 standalone doesn't come with msys installation, but comes with grass 7 folders. QGIS 2.12 standalone comes with msys and grass 6.4 folders, yet no grass 7. The solution is as simple as copying the folders from one registry to the other. I worked with both 2.12 and 2.14 to verify that this works, and it does. In order to have ...


5

The inconsistency is caused by invalid points in the dataset. When I run (libLAS) lasinfo on the provided sample, I get: 1170966 Unclassified (1) 1565144 Ground (2) But when I execute: las2las -i sample.las --valid_only -o sample2.las I get much lower number of points: 448086 Unclassified (1) 633077 Ground (2) which is exactly what r.in.lidar ...


5

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 option is to produce a raster of the original situation. To produce it, I would use some countour lines to draw "by hand" the terrain as it was before the ...


5

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=GHS_POP_GPW41975_GLOBE_R2015A_54009_1k_v1_0 setnull=0 When you visualise your dataset, you should see something that broadly resembles the map of the world: You then ...


4

There is a relatively new module g.search.module which lists modules based on keywords. Perhaps could be helpful for what you are trying to do. This module is so far in GRASS 7.1 only.


4

The raster If your raster is not in a the current region, all the values are nan Therefore by security from grass.pygrass.gis.region import Region current = Region() current.align('aspect') Then elev=raster.RasterRow('aspect') # one of my raster layers elev.open() elev.is_open() True elev.get_row(1) Buffer([ nan, nan, nan, ..., nan, nan, nan], ...


4

Why not upgrading your QGIS version? To know the GRASS path, you need to know how Processing really works. First, it is a Python module (processing) that uses subprocess to execute the original GRASS commands. Consequently, the script need to know the Grass installation path. With Python in the console, you can obtain the default path (I suppose you ...


4

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="/path_to/.grass7/rc" Then with Python import grass.script.setup as gsetup gisbase = os.environ['GISBASE'] gisdb="path_to_your_GISDBASE" location="Geol" mapset="test" ...


4

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\etc\python' in Python just sets a variable (global one in your case) which is just a Python variable, nothing more, nothing less. The aforementioned wiki just ...


4

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 file... Installation of <r.denoise> successfully finished GRASS 7.1.svn (Geol):~ > r.denoise Description: r.denoise - denoise topographic data Usage: ...


4

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 projection definition does not care about datum shifts nor EPSG codes. So QGIS has to guess, and selects the wrong one. Try Set Layer CRS to get it back to the ...


4

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 (real). Use to_real( "Area (ha)" ) expression like this: Then, you will see Area field in the tool options.


3

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,tile2,tile3,...,tilen output=merged_raster You should be able to display the merged raster in your GRASS monitor. If it is still blank, try passing -z to r.patch. ...


3

Yes, it is possible to launch the GRASS GUI from R within a running GRASS session. It did not work because the environment variables where not correctly set. Modifiying the environment variables as follows solved the problem: # Set PYTHONPATH Sys.setenv(PYTHONPATH = paste0("C:\\OSGEO4~1\\apps\\grass\\grass-7.0.3\\etc\\python;C:\\OSGEO4~1\\apps\\grass\\...


3

Various r.stream.* modules must be installed as addons with g.extension. This must be done in GRASS explicitly, because g.extension seems not available via QGIS. see for details: https://grasswiki.osgeo.org/wiki/AddOns/GRASS7/raster This works fine for GRASS7 as a standalone application. edit/add: ... but might not really solve your issue, but this might ...


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

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 updated using the method sys.path.append() and that is all. A workaround is to re-execute the script after setting up the environment. This way the interpreter ...


3

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. I've run into the same issue with many of my rasters, especially when I've imported them during different sessions. Corrrecting Misalignment First set and save ...


3

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,'10','0.01',True,True, extent, -1.0, 0.0001, 0, None)


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

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%206%20Lab/QGIS%202.4%20and%20GRASS%206.4.4/Module%206%20Lab.md Which actually helped me retrace my steps and solve my problem.


3

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 click the icon next to 'rotation' and choose 'edit..' 'fields and values' dropdown -> select the field with your rotation values Seeing your picture, I think you´d ...


3

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 try to run the process again. You can check that the region settings are correct by: g.region -p and you should find that they are consistent with the ...


3

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 location B, or, at map level, you can use r.pack/v.pack to package maps and unpack them in the target mapset with r.unpack/v.unpack in a lossless way. When ...


3

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( "grass7:v.clean", {'input': hn_pg, 'type':[0,1,2,3,4,5,6], 'tool':[1], # snap 'threshold':0.5, '...


2

The problem is that the two features are not matching in the 3rd dimension! A quick look at the manual give the explanation: In case that one or both input vector maps are 3D, features need to touch also in the 3rd dimension (z coordinate) in order to transfer attributes. And the check: v.info -g nature # check the top and the bottom top=0.000000 ...


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