Tag Info

Hot answers tagged

4

These are GRASS GIS standard commands: r3.out.vtk: r.out.vtk: v.out.vtk:


3

If you want to do that with PyQGIS, the def Val_raster(x,y,layer,bands,gt) of Python Script for getting elevation difference between two points becomes: def Val_raster(point,raster): return raster.dataProvider().identify(point,QgsRaster.IdentifyFormatValue).results().values() for point in points.getFeatures(): geompt = point.geometry().asPoint() ...


3

In GRASS: r.mapcalc "uniform_raster = 1" (or any other value you choose) As always with GRASS, be sure to set the region first.


2

This is not exactly the answer to your question, but rather a suggestion. For RS, I would not use QGIS as a core software, because it is more oriented for GIS (even if it includes many tools). I suggest that you have a look at GRASS 7 (the new GUI is a true step forward). I don't have a look of experience because it is new, but I got some feedback and I've ...


2

The GRASS 7 meta-package made available last week had errors that cause this situation. The ubuntugis-unstable PPA maintainers have in consequence removed this meta-package. In a system where this rogue GRASS 7 meta-package was installed the fix is to remove all its packages and downgrade: sudo apt-get purge grass grass-core grass-doc grass-gui sudo ...


2

In an email exchange with Radim Blazek in the grass-user mailing list he explained: QGis from OSGeo4Win is compiled with GRASS 6, you cannot get it working with GRASS 7. Reinstalling will not help. The provider and the plugin has first to be fixed to support build with both GRASS 6 and GRASS 7. This is in the first package of proposed upgrade: ...


1

For the r.relief command in GRASS, the scale factor only needs to be set to a value other than 1 if your DEM does not use metres for storing the elevation. It does not matter whether the horizontal units are metres, feet or degrees. The reason for this is that r.relief uses the function G_distance internally for calculating the horizontal distance between ...


1

Here are three suggestions. First, you should upgrade to a new version of QGIS. For your shaded relief, QGIS has a built-in shaded relief module. You can use that to get your shaded relief raster without the need for GRASS at all. It's under the menu Raster->Analysis->DEM. To calculate watersheds, I would suggest running GRASS alone, not thru the QGIS ...


1

Your main problem now is that "your raster map is in diferent zone (-49) that current region (0)". At the begining of the post, you pointed out that the projection was in wgs 84/UTM zone 49S (EPSG : 37249). This projection is wrong. The correct one is EPSG: 32749. Afterward, assuming that your country is Indonesia, you have to click in Set before a new ...


1

WHen you mention 200 pixels, do you mean a neighborhood of 200 pixels width? or a neighborhood that contains 200 pixels? The GRASS r.neighborhood command takes a "size" parameters which is the width of the window. So for the second case, a circular window containing 200 pixels then the width will be about: 2 x sqrt(area/pi) or ~17. I tried some tests as ...


1

in qgis raster calculator, the comparison return 0 (if false) or 1 (if true). So you can write a conditional using a sum of products. ((raster1@1 >0.3) * raster1@1 * raster2@1 ) + ((raster1@1 <=0.3) * raster1@1 * raster3@1 )


1

I would point out, in addition, that the GRASS model, v.what.rast takes a point layer and raster layer as input and uploads the raster values to a given attrib column for all points. To run this in the python console (within a GRASS session) you would do something like: import os import grass.script as grass input_points = "<your point list>" ...


1

From GRASS Raster Library, GRASS GIS 7 Programmer's Manual: Raster map data can be of type CELL, FCELL or DCELL, they are defined in "gis.h". CELL is a 32-bit signed integer, FCELL is an IEEE single-precision floating-point, and DCELL is an IEEE double-precision floating-point. 3D rasters (grid3d) is treated as DCELL (see related library).



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