In QGIS 2.8.1 there's a tool in the Vector menu that can split a dataset based on an attribute.
Look in Vector > Data Management Tools > Split Vector Layer...
It's a basic tool that should work if you don't want to resort to plugins or tools in Processing; unless they offer additional functionality you need.
Interesting question! It's something I've wanted to try myself, so gave it a go.
You can do this in PostGRES/POSTGIS with a function which generates a set of polygons.
In my case, I have a table with one feature (a MULTILINESTRING) which represents a railway line. It needs to use a CRS in meters, I'm using osgb (27700). I've done 4km x 2km 'pages'.
I was struggling to do exactly the same thing, but for various reasons I'm committed to using QGIS. I tried using v.rast.stats using the GRASS plugin and also via the Sextante plugin. The latter approach failed, because it seems to attach the stats to a temporary vector layer which it then deletes. The GRASS plugin worked, but it doesn't deal with ...
Attempt to answer my own question:
The cause of striping in the examples I provided are entirely due to my workflow, not any legacy issue with how the data was originally assembled or mosaiced together. The DEMs I was dealing with were all generated from newer techniques, as evidenced by this map:
The two methods that cover the areas I was working with ...
It can be done in one step in QGIS in the raster calculator.
In QGIS3, for a raster layer named "x", use the following expression:
(("x">0)*"x") / (("x">0)*1 + ("x"<=0)*0)
This trick maps raster values x>0 into the ratio x/1 = x, and raster values x<=0 into the ratio 0/0 = NaN. This NaN is rendered as FLOAT_MIN (aka -3.402832...e+38) if the ...
This is a good question, and one that I tend to get asked from time to time. First, as you've pointed out, the equation for TWI = ln(a / tan(B)), where a is the 'specific' catchment area (i.e. the upslope inflowing area normalized for a measure of contour length) and B is the slope gradient, in radians, at the grid cell. As you correctly pointed out TWI will ...
There is differents solutions. And this can work with simple polyline and multiple selected entities
select orientation for generation and read index (left-to-right, north-to-south...)
set object size
shape = (4000,8000) # (<width>,<length>)
define superposition coef (10% by default ?)
Ordering polyline (...
Steven Kays answer in pyqgis.
Just select the lines in your layer before running the script.
The script does not support the linemerging so it can not work on layer with multilinestring
# coding: utf-8
from qgis.core import QgsMapLayerRegistry, ...
Using QGIS you can quickly divide a given shapefile up into regular rectangles as you've shown in your example.
Load the original shapefile;
Use Vector|Research Tools|Vector grid and create a grid of polygons the same extent as your shapefile, with the right distance between divisions ('parameters') selected (100 in my example image below);
Intersect the ...
You could start by getting the difference of the two DEMs. QGIS has a raster calculator tool that should come in handy. Just get tiles of both DEMs that cover the same area and subtract the values of one DEM from the other. That should get you a nice raster layer that shows the differences in elevation between the two DEMs.
I hesitate to mention this because markusN's answer is so good. But if you don't get on with GRASS and if your DEM is not too large you could try the following.
Firstly, note the coordinates for the pixels that you wish to edit. Then explode the DEM to xyz triplets using gdal2xyz:
gdal2xyz.py input_dem.tif output.csv
'output.csv' will be a space delimited ...
Try the following commands from a command line:
sudo add-apt-repository ppa:johanvdw/saga-gis
sudo apt-get update
sudo apt-get install saga
The problem may be that synaptic has not updated it sources because the signing key was not imported. This should be the most easy way to fix that error.
It seems the wxwidgets package for raring was uploaded ...
Many thanks to Dominik. My first answer is not correct for QGIS 2.8.3 (the expression "myraster@1" > 0 returns 0 or 1 for non-nodata input, for nodata input it returns nodata).
The following QGIS Raster Calculator expression should be sufficient
(raster layer named "myraster"), since the QGIS Raster Calculator
sets all pixels that do not satisfy the ...
First, you need to calculate at least the slope. F.ex I have the following data:
Then put the correct data as variables to the module:
And at last you should get the result:
With Catchment Area as input
the results are:
The tool you mentioned in ArcGIS does not snap one layer to another. Rather it snaps the boundaries in a layer to "themselves". So it you have two lines in the same layer that are within a certain threshold, Integrate will snap them together (i.e. move them both to the average distance between them).
This action is done in GRASS with the v.edit module, ...
In spatial hydrology, DEM-based flow accumulation operations are typically static. That is, they represent a steady-state condition of the discharge of surface and near surface water passing through a point. Flow accumulation grids are actually accumulating contributing area downslope, i.e. areas not volumes. The accumulated cells that you described is ...
Due to how complex it was to manage multiple versions (and how fast and erraticly the SAGA API changes), it was decided to support a single version. SAGA 2.3 is supposed to be something like an LTR, so API changes are not to be expected. Also, that's the version shipped with OSGEO4W.
any more info you can provide about the messages you see about your SAGA ...
As you would have seen from the referenced GIS SE question, there doesn't appear to be much in the way of viewshed stand-alone packages at least in the Open Source market beyond SAGA and GRASS GIS. Apart from writing a wrapper around the code for these algorthims you may end up implementing viewshed yourself unfortunately. (Though I would love to be ...
I got good results with mDenoise. This tool uses the Sun's denoising algorithm which removes noise without filtering sharp edges like ridges or peaks. Good for mountainous areas especially high mountains.
You can define the threshold and the number of iterations. You have to try something around to get the best result.
Before denoising ASTER GDEM2:
I develop a free and open-source GIS called Whitebox Geospatial Analysis Tools (can be downloaded here) that has extensive analysis functionality for processing LiDAR data. Whitebox contains a tool specifically for calculating the point-density of LiDAR LAS files called Point Density LiDAR.
The tool is highly specific to LiDAR, taking one or more LAS files ...
You may check out the 'Trace Downslope Flowpaths' tool in Whitebox GAT. It will identify the cells in a DEM that receive flow from upslope target cells. It is however based on the D8 flow algorithm and therefore cannot model flow dispersion, which would yield downslope 'areas' as you are referring to them as. Nonetheless, there is some debate in the ...
I think I see the problem.
I could reproduce this, both using your script, and SAGA itself. The output from SAGA matches the output from your script. So it's not RSAGA.
But look at the slope output from SAGA... vast areas are near-vertical, with slopes around 1.57 radians (nearly 90 degrees) with some flat areas. You can confirm this looking at the ...