[Gvsig_english] Create Slope from Contour Line
Simon Cropper (The fosGIS Workflow Guides)
scropper at botanicusaustralia.com.au
Mon Jul 11 06:14:07 CEST 2011
On 11/07/11 13:33, Adi Fajar RAMLY wrote:
> Hi All,
>
> Greetings from Indonesia. I want to ask if possible to create slope class
> from contour lines? I got a lot of questions from colleagues from
> environment office in Provincial/districts, where we try to socialize the
> use of opensource GIS for environmental officer in
> Provincial/Districts/Municipal Environmental Office rather than using
> proprietary software such as ESRI GIS Products.
>
> By the way, is it also possible to generate contour lines from the data dem
> / SRTM (HGT file format) using gvSIG such as in Global Mapper?
>
> thanks for the assistance...
>
> Regards,
>
> Adi
>
Adi,
Here is a draft tutorial I have in the mill to publish on my website.
I am willing to release the text here under a Creative
Commons-Attribution-ShareAlike (CC-BY-SA Australia 3.0) licence, as the
process was thrashed out with the help of all the great people on this list.
http://creativecommons.org/licenses/by-sa/3.0/au/deed.en
Eventually I will be releasing the tutorial using actual data and images
showing each step, so if you are interested you can put yourself on the
email notification list.
If you have any problem following the steps in the following tutorial
let me know and I will see if I can help you through the issues.
**Terrain analysis using contour data**
*Step 1. Preparation*
Open a project file, create a new view and add your contour data file to
the view. This shapefile should contain a numeric field indicating the
elevation or altitude.
*Step 2. Create a DEM*
Open Sextante and choose “Rasterize Vector Layer” under the
“Rasterization and interpolation” category.
You should see the 'Rasterize Vector Layer” Dialog.
Choose the vector layer and elevation/altitude field, and input a
legitimate output file name.
In the Raster Output Tab, select 'Use Extent from layer” and under cell
size input 20, 50 or 100m for the size of the cell. You will need to
experiment with this value to obtain the best output.
You should end up with a black box with white cells overlapping the
contour positions. The black areas are voids in the grid file and do not
contain data. This file is referred to as a Digital Terrain Model or DEM.
*Step 3. Filling in the blanks*
The next step is to fill in the values between the grid cells that
appear in the DEM.
Open Sextante and choose “Void Filling” under the “Basic Tools for
raster layers” category. The “Void Filling” dialog should appear.
Choose the raster layer, and input a legitimate output file name. Leave
the Tension threshold at 0.1.
You should end up with a graduated black-and-white raster file.
If you move your contour file above the raster file in your Table of
contents, you can visually confirm that the elevation matches the raster
file created.
Right click the raster file and select “Raster Properties” then open the
“Bands” tab. Check and uncheck R, G, B radio buttons to see how the map
changes. Although not part of the analysis it helps if your choose a
colour you find appealing and contrasts well with your contours.
Right click the raster file and select “rename” and allocate a name that
makes sense (e.g. rast_void_filling) to distinguish the raster from
others versions.
Step 4. Clean up the DEM
Open Sextante and choose “Crop grid with polygon layer” under the “basic
tools for raster layers” category.
*Step 4. Establishing the Slope*
Open Sextante and choose “Slope” under the “Geomorphometry and terrain
analysis” category. The “Slope” dialog should appear.
Select complete raster file (e.g. rast_void_filling), the type of slope
and units required (in my case I use 'Maximum slope Travis et al.1975'),
and a legitimate name for the output file.
In the “raster output” tab select “Use extent from layer” and select the
raster file being used (e.g. rast_void_filling) and leave the cell size
the same (i.e. 20m).
You should have a black screen with faint lighter areas where slope are
greater. Depending on the variation across the site then this raster
file can be difficult to visualize. Move your contour file above the
raster in the ToC and use the information tools to query individual
cells to see if the results are as expected. You can play with the
values in the enhance tab to try and visualize the changes in the cell
values.
*Step 5. Create classification groups for slope*
Open Sextante and choose “Unsupervised classification (clustering)”
under the “Raster layer analysis” category. The “Unsupervised
classification (clustering)” dialog should appear.
Select Raster Layer, set the number of classes to 5 and define a
legitimate raster file name and database name. The database will contain
the boundary of the classes.
Open Sextante and choose “Vectorize raster layer (polygons)” under the
“Vectorization” category. The “Unsupervised classification (clustering)”
dialog should appear. Select the raster and a legitimate name.
I hope this helps.
--
Cheers Simon
Simon Cropper
Website Administrator
http://gis.fossworkflowguides.com
The fosGIS Workflow Guide
* English - detected
* English
* English
<javascript:void(0);> <#>
More information about the Gvsig_internacional
mailing list