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.
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.
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,
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 ...
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 ...
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 ...
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 ...
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()
elev=raster.RasterRow('aspect') # one of my raster layers
Buffer([ nan, nan, nan, ..., nan, nan, nan], ...
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 ...
I use this
export GISBASE="path_to_your GISBASE"
Then with Python
import grass.script.setup as gsetup
gisbase = os.environ['GISBASE']
The linked says you need to set environmental variables. This is done in Python using e.g.:
os.environ['GISBASE'] = "/some/path"
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 ...
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 ...
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.
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. ...
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\\...
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.
... but might not really solve your issue, but this might ...
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, ...
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 ...
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.
First set and save ...
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)
So researching for my issue I came across an old github repository filled with lectures on how to do a Supervised Classification
Which actually helped me retrace my steps and solve my problem.
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 ...
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.:
and then try to run the process again.
You can check that the region settings are correct by:
and you should find that they are consistent with the ...
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.
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(
'tool':, # snap
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