Friday 22 February 2019

qgis - Convert xyz points to topography and calculate mean slope



I am working on point data (x, y, z) in meters from origin. I have between 24 and 35 points for each plot (10mx10m), with random locations. I would like to modelise topography over the whole plot in order to calculate mean slope in 1m x 1m subplot in QGIS.


X       Y         Z
0 0 0
-1,327 7,902 -1,656
7,122 -2,309 -1,627
1,964 -5,87 0,569
-6,443 -0,306 1,184
-0,458 7,322 -1,612
0,336 6,808 -1,603
-0,164 6,036 -1,294


I looked at zone statistics, but I need a raster to use it. I also looked at GRASS to make a raster but it seems that I should have a regular grid, yet I know it is possible to get quite nice results with other softwares such as Surfer.


I am new to QGIS (and GIS in general).



Answer



Make sure the file is either txt file or csv file.


Go to Qgis click "Layer->add layer->add delimited text layer". Browse to the file. In the window that opens check if the X Y Z values are in correct column. Else you need to to change the delimiter in same window. Once your set click OK.


In coordinate reference system selector you browse to the correct CRS and then click OK. Now you should see the data visualize in the map window as Points. Each Point has x,y coordinate and your Z value.


Now you can create a "raster" from the Point data. Go to "Raster->interpolate". In the interpolate window you choose Z as interpolation attribute and then click "Add". Then you choose your preferred interpolation method. Then you click on the button next to "Output file". Browse to a folder and choose a name for the file that will be created. Then click OK.


A new layer is added to the table of contents. This is a raster layer , with this layer you can do your slope aspect analysis. Go to "Raster->Terrain analysis->slope".


Hope this gets you started.



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...