Tag Info

New answers tagged

0

The Spread distance is an estimate of the distance field from one or more target cells, such that the distances are routed through the grid lattice (see below). It's calculated iterative, in a way that minimizes the distance field, i.e. shorter routes are sought in each iteration until no shorter route between each grid cell and their nearest target cell can ...


0

The format looks like AAIGrid, see How can I convert a ascii file to geotiff using Python? for an example. You can use gdal_translate to convert it to geotiff: gdal_translate -of "GTiff" fname.asc outname.tif The file extension .asc is important to tell gdal which format to use. Or use the python code from the linked question.


0

Also consider using an algorithm other than the snakes algorithm under v.generalize or try and adjust the parameters to improve the tradeoff between efficiency and smoothness. It is the most computationally expensive smoothing algorithms in GRASS. I would recommend making a smaller test subdataset, and try a range of parameters for several different ...


1

Ok, I solved. I use Global Mapper instead of GRASS or QGis. There is an option to add elevation data to all vertices from the dtm. Then I exported the vector as a dxf. I still have in Autocad a 3D DXF. Great and easy! :)


1

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


0

To revert line direction you can go with v.edit and the flip option.


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.


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), ...


0

Here is a approach made with GRASS on al Linux machine. Import your vector layer with the point features: v.in.ogr -o dsn=/your_shapefile_directory layer=your_vector_layer output=points_moved Then move (in meter) your points with half of the size of the grid you want to have (first X, second Y direction): v.edit map=points_moved type=point tool=move ...


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, ...


-1

Solution found! R.univar, despite the name, can actually calculate statistics on multiple raster at ones. My bad for not checking thoroughly. Thanks markusN for answering me..


0

Since you appear to use a vector representation of the routes, you may first split it into short segments (in order to later have a representative view on slope etc), using v.split; then add a new column to the attribute table of that road map: "slope double precision" using v.db.addcolumn; eventually upload the respective road segment slopes to the ...


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 ...


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 ...


0

The problem was that I had not loaded the min / max values in the raster layer's style properties.


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

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

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 ...


0

You can open the images in ENVI (band by band) and apply the equations of this paper: DN to Radiance Radiance to Reflectance the parameters are inside the metadata (*.mtl) gain= RADIANCE_MULT_BAND offset or bias= RADIANCE_ADD_BAND date=DATE_ACQUIRED cos(tetha)=sen(SUN_ELEVATION) d=EARTH_SUN_DISTANCE landsat 8 doesnt need ESUN also in the ...


0

Why did you install Python from MacPort while there are many versions of Apple Python pre-installed ? (look at QGIS on Mavericks) I will try to help you but I don't use MacPorts and I don't know where the GRASS libraries are installed. I think you'd have to ask a MacPorts list. The problem is that the great majority of users do not know what is MacPorts and ...


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.


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 ...


0

The error message come really from GDAL which is used by GRASS GIS for the export to GeoTIFF. It sounds overly dramatic, in fact only the color table gets lost during the export because the GeoTIFF format does not support floating point color tables (GRASS does). You may export to ENVI format right away: http://www.gdal.org/frmt_various.html#ENVI by ...


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 ...


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 ...


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 ...


0

As Evil Genius is saying, the (black) system (MS Windows) command line does not know anything about GRASS GIS and auto-completes only the things which it knows about, so programs on path (GRASS GIS modules are on path) and files. So, it should auto-complete GRASS GIS commands but will not complete their parameters or map names because it does not know ...


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. ...


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

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

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

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

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 ...


0

This is an older one, but since it does not have an accepted answer: GRASS GIS is divided into modules. Each module is a command line program which can by invoked in many ways. Inside GRASS itself, it is through the system command line or GUI (with our without auto-generated GUI dialog). Most of the GRASS functionality is exposed through modules. There is ...


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 ...


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.


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: ...


0

The GRASS command v.out.ogr, which you would use to export a vector to a shape, takes a layer= parameter. This way you can export separate layers from a GRASS vector. The values would be 0,1 etc. But when you say "vector map has multiple layers" I assume you mean that the vector contains both points and lines. In this case use the type= parameter to get ...



Top 50 recent answers are included