0

My purpose is to create a DEM raster in GRASS 7.0.0 starting from a shapefile containing contour lines.

The attributes table has a field named QUOTE_INT containing the elevation as integer.

I started importing the shapefile with the command v.in.ogr.

Here I'm stuck because when I run the command v.to.rast I obtain a raster filled monochromatically instead of a raster containing the contour lines coloured based on their elevation.

What am I doing wrong?

1

I found the problem and solved it. it was related to the region resolution (I thought that the measurement unit for the field Grid resolution 2D was meter and I inserted the value 1 in that field because I wanted the region to have a 1m res, but printing the output I saw that the region had only 1 cell in that way... so I deduced that the measurement unit for that field was degree).

I solved it changing the number of rows and columns of the region before running the command v.to.rast.

  • We need to know the error message in order to help you... – markusN Apr 8 '15 at 19:27
1

If you post the exact command you are using, it should be:

v.to rast input=<your contour input vector> output=ctour_raster use=attr column=QUOTE_INT

Then use the contour raster in r.surf.contour:

r.surf.contour input=ctour_raster output=dem

For more options you can read this wiki page

0

Follow the example from the GRASS wiki.

Since you get a monochromatical raster I assume you have to apply r.colors. You can use e.g. srtm or terrain as color code. See also: http://grasswiki.osgeo.org/wiki/Color_tables

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.