1

I am creating some visualizations in ParaView and I have several 2D shapefiles (rivers, lakes, streets, project boundaries etc) but they are all 2D, so are plotted at elevation = 0. I'm hoping to create the visualizations in 3D on the surface of a 3D map of elevations that looks something like this:

enter image description here

So I'd like to convert my 2D shapefiles to 3D using the elevation data on my 3D elevation map (currently in XYZ format but can be converted if it makes things easier), with the end goal to be able to plot things like this road going up a valley:

enter image description here

Can anyone suggest a possible way to add elevation data from my elevation map to a 2D shapefile to make it follow the surface elevation in 3D...with QGIS or other tool?

Corentin Lemaitre method seems to be the right way to approach this, but I'm trying to narrow down some small discrepancies in teh results between my elevation data and the draped shape file: enter image description here

My raster elevation map goes up to the midpoint of the cells visible on the screenshot above, but the draped shapefile elevation drops off half a cell before that. The raster resolution is much finer than the cell (6 pixels per cell). Less visible here is that the draped elevations float above the top of the mesh where the interpolations are taking place.

1 Answer 1

1

The tool Drape (set Z value from raster) is build for that.

Open the processing toolbox then go to vector geometry then drape. You have to select a raster as input layer.

If you have no raster data for your first 3d model then you should build one, the tool rasterize or rasterize mesh dataset could help.

2
  • 1
    Thanks! That worked. I had to convert my XYZ data to a raster first (via TIN interpolation) and it's pretty close to what I need. There are a few strange artificats in the results that I can't figure out though (added pic to the question). Jun 16, 2021 at 19:26
  • Good option to use Tin. If you tin cells are 6 time more dense there will be a guess between your data point based on the tin method used. If it is linear then the result you get is normal. If you need to expand your data then you can download a greater zone or even expand your raster data with this answer : gis.stackexchange.com/questions/394139/… Jun 16, 2021 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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