More

How to input Shapefile point data into a raster and have the raster adjust to the new data?

How to input Shapefile point data into a raster and have the raster adjust to the new data?


I have a shapefile with elevation data at specific points. I also have a raster that has incorrect elevation values, but the transition between pixels is what I need. Is there a way to put the values from the shapefile into the raster and have the values around the points adjust to the new values.

Some of the elevations on the raster are correct, so I can't increase all of the values the same amount.


It sounds like you have a DEM and you want to augment the accuracy of that DEM with some elevation data you collected as points.

That's totally possible but the process probably isn't as linear as you would like it to be. That is - you can't (to my knowledge) update the values of raster cells from vector points directly. You have to go through the process of augmenting your old data with the new and then creating a new modeled surface from the combined set.

Here's what I would do (please bear in mind that this is a simple outline, and does not take into account the requirements, strengths/weaknesses of the various available interpolation techniques):

  1. Convert your raster back to points. This will give you a big grid with a point at the center of each raster cell with the elevation value of that cell.
  2. Put your shapefile data on the same map and for each point in your shapefile update the value of the converted point (from the raster) that is closest to each point in the shapefile.
  3. Do some research and find out what interpolation technique is best for elevation and your particular setting. Then use that interpolation technique to generate a new raster from the now updated points. I would recommend using the points that you converted from your first raster for this process because they will already be a grid and that will give you a more uniform raster.

As with any GIS project this is probably going to be an iterative process of running it, figuring out what was wrong and trying it again a few times. I'm sure there is a lot of nuance to elevation modeling that I am missing - but this is how I would start with this process. I hope it helps you.


Watch the video: Reproject, resample and clip raster data with GDAL in Python