Tag Info

New answers tagged

0

I figured out that I need a mask layer to cover the values that I do not want to be changed. So, I created a polygon of my "inverse" PA layer, and put it in r.mask as mask layer. Then, in r.mapcalculator, input the source layer and in equation just wrote -1*A. I did the same for my PA layer (as mask). Finally, I have two layers, one with positive and the ...


1

This might do it: r.mapcalc "distances_with_negatives = if(isnull(B), -1.0*A, A)"


0

Not directly related to the question, but since I landed here I'm guessing others might as well. I was also having problems with numpy on Ubuntu 14.04 (when using GRASS 7.0.0). The issue in my case was the numpy version, which was 1.9 whereas the subpackage numpy.oldnumeric (needed by GRASS) is only shipped with numpy until version 1.8. The solution was ...


2

There is no function, but you can use the modulus operator, which is "%" in GRASS (as in many other languages), e.g. 8%5=3 for a pixel-by-pixel computation, simply use the layer names layerOne%layerTwo


0

By now it is likely you have solved this, but for those of you who still are looking for this, you can do this with the raster calculator in QGIS. The example Fezter refers to, is unfortunately extremely simplified. Lets say you have values from 1 to 360 that you want to reclassify into 3 classes, then the syntax should look like this: ("raster" < 90) * ...


2

The DOS methods are for atmospheric correction only, not radiometric correction. The i.*.toar modules allow you to combine in one step radiometric correction with some additional DOS atmospheric correction method. The input to the i.*.toar modules is the original DN values. The default to i.*.toar is "uncorrected", so normally you would use i.*.toar to get ...


1

Thank you very much for your responses! Eventually, is very very easy to work with GRASS GIS through R. After you have created in GRASS the location and mapset in which you wish to work, you can type in the GRASS shell: "rstudio &" "&" Helps for working simultaneously in both GRASS GIS and R. Otherwise, the GRASS shell would switch to R. And that is ...


0

The problem was that the color of the Landsat bands was set to white during the i.topo.corr process. When I set the color table for each band to gray I was able to see the bands.


1

I think is better to use r.series. You have 4 files with different values (as I can see). You have to choose the function according to what you want to have. I suppose you want the files with the value 10 "up" the others from "behind". Perhaps you can use the r.series twice. First for the DEM files and then for the roads using the maximum function. For the ...


0

TRy to use : r.patch This is the documentaion : http://grass.osgeo.org/grass64/manuals/r.patch.html


2

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.


5

Here is a quick worked example of setting the GRASS environment, reading an on-disk raster, calculating a focal mean (using r.neighbors) and reading the results back into R. Hopefully this will get you started. if (!require(rgrass7)) stop("rgrass7 PACKAGE MISSING") setwd("D:/TMP") # Working directory # Set on-disk raster variable rname <- ...


2

r.bioclim (I suppose, because r.bioclimatic don't exist), is an GRASS GIS 7 addon If you want to create or modify an algorithm, read the file ../processing/algs/grass7/grass7.txt that begins with "A short guide for creating and editing GRASS GIS 7 algorithms" But, how do these commands work ? to use the GRASS7 commands in processing,you need to first ...


0

I'm not sure, but maybe youneed to define a region from your input raster. I had the same problem and the cause was the region


0

I think the problem was that the process took so long to run that I thought it had quit. This time I cut the raster in half and then created a smaller raster using r.thin and let it run. Still it produced 600,000 points. I'll try it again, using a raster that is even more thinned.


0

From your comment, above, regarding region settings, you mentioned that the original DEM is 30 meter resolution. In a WGS84 Long/Lat coordinate system, with degrees as units, that should be about 1 arc-sec. But in your second comment you can see that the resolution ("Computational region" in GRASS terms) is about 54 seconds. Your region covers about about 15 ...


0

I am not sure why your r.to.vect is not working as expected in QGIS. Maybe your raster is too big? When I am running it from processing toolbox and choose Save to file it creates as expected point shapefile and loads it into map under temporary layer name. For big rasters you can try convert raster into points (x,y,z) in QGIS by using Raster / Conversion / ...


1

It looks like, from the docs: http://grass.osgeo.org/grass70/manuals/addons/r.to.vect.lines.html that there is a skip parameter. The default is 10 so perhaps if you reduce it you will get more points. It looks like there's a smoothing function in grass too: http://grass.osgeo.org/grass64/manuals/v.generalize.html with tutorial: ...


0

take a look at shapely and Pyshp enter link description here These a two python libraries that can deal with 3d data. Also you should use matplotlib for display


2

You should check out SFCGAL, which is a C++ wrapper library around CGAL with the aim of supporting ISO 19107:2013 and OGC Simple Features Access 1.2 for 3D operations. You can use it from a specialised version of PostGIS, here are the functions for PostGIS 2.1. Also, check out the existing functions that matches \df ST_3D*, which doesn't require SFCGAL. ...


0

What version of QGIS do you use and on what OS (Windows, Mac OS X, Linux) ? When you use a GRASS GIS algorithm, it is interesting to know a minimum of this software. 1) The GRASS GIS command is i.zc and the help says input=string Name of input raster map input=string just because the name of a layer is not a number as width=integer for example.The ...


0

After checking this post i was able to shift a raster using the python console on grass.


2

If you want to have the maps copied in the new Mapset, use: g.copy to copy one by one, e.g. g.copy raster=streams@practice1,streams g.copyall to copy all at once (available in GRASS Addons, use g.extension g.copyall or GUI to install it) you may want to delete the original maps (using g.remove) or whole Mapsets in order to save space If you want to just ...


0

Yes, and there are more resources available now (besides the one listed by gene): Working with GRASS without starting it explicitly by manually setting some or all necessary variables and files grass.script.setup.init function which helps in setting up the required variables and files GRASS Batch jobs using GRASS_BATCH_JOB environment variable and GRASS ...


0

Sounds like a user issue with your computational region: if you want to export the full map, be sure to set the computational region to the full map prior to export (g.region rast=your_rastermap -p). Then export. Note that r.info reports the full map min/max while those of the actual computational region can differ from that. E.g., you have a DEM of Europe ...



Top 50 recent answers are included