Tag Info

Hot answers tagged

4

I believe you can use some map algebra (raster > raster calculator) before you can preform your volume measurements in grass. Assuming that your bathymetric data use positive values to represent the sea depth, and using your example for the range as 50 the min_depth and 200 the max_depth. For each of the raster cells you need to "remove" anything below the ...


4

The ASTER L1B files contain several subdatasets with different resolutions. That's why you can not easily add them to QGIS. You have to run gdalinfo and gdalwarp on it to get a tif file that QGIS can import: gdalinfo AST_L1B.hdf >>info.txt gives you a long list of metadata. Look out for the subdatasets: Subdatasets: ...


3

Here is a suggestion using GridTopology from R. library(sp) library(rgeos) # coordinates of some points x <- c(44, 66, 88, 22, 44, 66, 44, 66) y <- c(64, 64, 64, 48, 48, 48, 32, 32) sp <- SpatialPoints(cbind (x,y)) # dimensions of grid topleftCorner <- bbox(sp)[,1] columns <- length(unique(x)) rows <- length(unique(y)) cellWidth <- 22 ...


3

As you are working with GRASS 7, you can use (look at Workshop pygrass: modules): 1) grass.scriptwith the run_command(), read_command(),parse_command() functions or in pure Python from grass.script import core as grass region = grass.parse_command('g.region', flags='p') {'ellipsoid: international': None, 'zone: 0': None, 'north:131321.2037345': None, ...


2

I'm not sure exactly what kind of TIF format a LISS3 image is, but I will assume that it is a geoTIFF as this is the case for most satellite data. Whitebox GAT can import uncompressed, single band GeoTIFF images simply by selecting them from the list of available files when you press 'Add Layer'. You can open multiple images at a time as well: Whitebox ...


2

In GRASS, location and dataset should share the same projection. On-the-fly-reprojection is only available in advanced GIS packages like QGIS or Arcgis. To change the projection, use gdalwarp to a different filename outside of GRASS.


2

You have to configure the region settings in GRASS before running any raster calculations. The region settings define for example the resolution of the output raster. In raster based calculations where there are multiple inputs it is important to work with the same resolutions, so the input rasters are in total cover. Also, resampling is a totally useless ...


2

I finally got the traveling salesman tool to work by using the v.clean.break tool, which in the QGIS GRASS dialog is under Vector->Develop Map-Toolset for cleaning topology of vector map. In QGIS there are no options for tolerance, you just enter the street vector layer. The v.clean.break tool breaks the lines at intersections, as shown. First, the unbroken ...


2

I have a tremendous respect for GRASS and the r.tarraflow algorithm and I'm sure that given enough effort, you would be able to make it work for this application. But as an alternative, I develop a cross-platform free and open-source GIS called Whitebox Geospatial Analysis Tools (download here). Here is an example for how to use it for hydrological ...


2

Inspired by WhiteboxDev's comment I have added MODIS support to i.tasscap in revision 62197. It is yet untested, please try it and report if all works fine. In order to obtain this improvement, you need to either install/update GRASS GIS 7.1 or even simply grab the updated i.tasscap (which is a Python script here).


2

The answer above, in accordance with the title of your question, refers to scripting in a bash shell. (Not python). If you would like more information on bash scripting, have a look at this tutorial (referred from the GRASS bash scripting wiki page If you want to work in python, then the language is quite different. For example, to loop thru a directory of ...


2

The proper syntax is: for file in $(ls *.tif); do r.in.gdal input=$file output=${file%.tif}; done; Where you gather the individual values provided by ls and iterate through them, so you have to put a variable sign($) before the ls command and put it between brackets. When you call for the file variable later, you can either call for $file as in the input ...


2

It is probably some quite large datasets you have to handle, and therefore i would perhaps not suggest a WPS solution, since you would be transferring data with the process request. WPS 1.0 has limited capabilites for asyc. requests - which will be enhanced in version 2.0 - making the solution with WPS a little more feasible i guess - but for now and in ...


2

Take a look on pyWPS, an OGC Web Processing Service implementation. Its easy to install on a python environment. Most of the examples use GRASS GIS as pyWPS only implements the interface for remote handling, but it is possible to use any GIS backend to do the actual processing work. So check out the gallery first, to get an idea what is possible and ...


2

It depends on the location projection (UTM in meters), not on the shapefile projection (in degrees) and GRASS GIS does not allow reprojection on the fly (look at GRASS wiki: Map Reprojection) You need to: 1) first create a location in the projection of your shapefile (in degrees) 2) import the shapefile into this location 3) within your new location (UTM), ...


1

You need to apply g.region on each raster before computations


1

These options are hard-coded in GrassAlgorithm.py so I just changed them. I'll probably write a fix for this (put it into the Processing settings) if I get the time.


1

Unfortunately this is a custom JSON format (and not GeoJSON), so I don't see any other option than reformat these data, which requires some coding: You can reformat it to conform GeoJSON (or any other format which is readable by OGR) and use v.in.ogr. Or you can reformat it to GRASS ASCII format and import the point data with v.in.ascii, see example 3.


1

The GRASS program that you linked to was written by Markus Neteler and he's done an excellent job of documenting the code. It appears that the tool has been written with the Tasseled Cap transformation (TCT) coefficients that are specific to Landsat TM and ETM (Landsat 4, 5 and 7). He makes a note in the documentation about whether or not it would make sense ...


1

You were right, the r.series manual page was a bit lousy. I have hopefully improved it now. Comments certainly welcome. Concerning quantiles, if you want a single, i.e. a global map value, then check r.quantile or r.univar Example: Calculation of multiple elevation quantiles, results are printed and not stored as a new map: g.region rast=elevation -p ...


1

In general, I think this is a topology problem. The destination node cannot be reached from the source node. According to its documentation, v.net.salesman calculates the optimal route to visit nodes on a vector network By definition of the traveling salesman problem, this route is a tour that must be connected. So, as the message suggests, if one of ...


1

Since GRASS GIS 6.4.3 should ideally start, maybe there is junk in the session configuration file (%APPDATA%\GRASS6\grassrc6 for GRASS 6 or %APPDATA%\GRASS7\rc for GRASS 7) where %APPDATA% is usually C:\Users\\AppData. To test, rename it and a new one will be created next time you run GRASS GIS. Note that %APPDATA% is a hidden folder. (cited from ...


1

The LOCATION_NAME variable is not set. To start a project with GRASS, you need to set a "fully qualified initial mapset directory" which is defined by a "GISDBASE/LOCATION_NAME/MAPSET" path. Have you tried to launch GRASS from the start menu instead of the cmd window? After this first launch, you will be asked to set the variables.


1

As Andre mentioned in GRASS your LOCATION coordinate system must match the coordinate system of the data being input. You can create a new LOCATION when you input the original tiff file by using the location= parameter. For example: r.in.gdal input=E:\cdnh43e_v1.1r1.tif output=cdnh43e_v1 location=LCC Now run: g.region raster=cdnh43e_v1 to set your ...


1

Consider to try GRASS GIS 7 for that which comes with a more efficient memory management for vector data. I have generalized the Austrian OpenStreetMap roads in one step, a reasonably big dataset, no problem on a normal desktop.


1

You have about three options: (Best) In the GRASS plugin, open the GRASS shell - it's at the top of the Module tree. Type into the command line the r.in.gdal command, and include the location=... parameter. This will create a new LOCATION based on your custom CRS, and import the raster there. You'll then need r.proj to reproject your other layers into this ...


1

I don't have an elegant answer but have a couple ideas that may send you in the right direction. Skyline in conjunction with Skyline Graph could get you close (requires 3D Analyst extension). Skyline uses the same line of sight principle. Search radius can be set (max_horizon_radius) and azimuth values should work to enforce the 8-tuple, but the tricky part ...


1

I would use SAGA or python. SAGA: -import raster to grid -reclassify all points greater than your min-depth to NODATA -reclassify all points less than max-depth to NODATA at this point you can visualize your band of habitat. then you can do several different things but I would: -create constant grid with value min-depth (not, max-depth is the deeper ...


1

There's another GRASS module that you might find applicable to your case: v.rast.stats. This module creates a table of univariate statistics for each polygon in a vector layer, from the values in a raster. You will get: sum=the total of all cell values with each polygon, which is your habitat volume. And for free you also will have max, min, mean, std, etc. ...



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