I am using GRASS GIS 7.4 and I have a DEM as points in a vector format and want to turn it into a raster.

I tried using v.to.rast and v.to.rast3, but the elevation is not one of the attributes so am struggling to set the source of raster values. I get the following options

Options_Example

and selected z, assuming this is the elevation. I run the function and it works, it creates a raster, but the raster is empty.

I did a query in one of the vector points and could see that the elevation is in Point_height, but I do not know how to use this as the source of the values for the raster. Does anyone have any solution for this?

Point_height_Example

Based on what you stated about your point data, v.to.rast or v.to.rast3 are not the right tools. You should try using one of the raster interpolation modules in GRASS.

Try the following tools and depending on your data quality, different method can give you slightly different DEM and you have to decide which one you want go for.

"r.surf.nnbathy" - Natural_neighbor interpolation

"v.surf.bspline" - B-splines interpolation

"v.surf.rst" and "v.vol.rst" - regularized splines with tension interpolation

"v.krige" - Kriging interpolation

Please consult the respective GRASS module manuals for how to use your x,y and z values.

You can also use SAGA interpolation tools (you might need to install it within QGIS depending on which version you are using) to produce similar DEM.

Hope this helps.

And, (FAQ #0 in GRASS) don't forget to set the region to the input vector extent before any interpolation or any other raster operations.

g.region -ap vect=lihir_0270 res=<choose your desired resolution>

Even though, as Hasnein pointed out, you probably want one of the interpolation algorithms, to address the specific question on v.to.rast: You can choose the "Raster values = z" option only if the vector is 3D.

If instead you have a column with elevation such as "Point_heights" then choose Raster values = 'attr' and in the "Attributes" tab select the Point_heights column.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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