1

There is a shapefile with point data of rainfall sampled at a regular grid, and there is a shapefile with point data of soil attributes sampled at a regular grid, but the latter with smaller pixel size (finer grid). For each point on the finer grid I need to obtain an interpolated value of rainfall data. Basically, I was thinking of converting rainfall data into a raster using gdal_grid and interpolating it using IDW method.

Are there any GDAL tools which will enable to convert the raster back to a shapefile with point data matching locations of the soil properties (given in shapefile)?

Andre Silva
  • 10,259
  • 12
  • 54
  • 106
Math_manul
  • 13
  • 4
  • 3
    I don't know about gdal, but it sounds like you're looking for an extract values at points tool/function. Your soils points would be your sample points and your interpolated precipitation raster would be your sampled raster. However if you wanted there are tools to convert a raster into vector (again, don't know about gdal). IDW may or may not be a good method to use for precipitation though (discussed in other questions here). – Chris W Apr 02 '15 at 00:40
  • 1
    GDAL_Grid would do the job of interpolating between the rainfall samples. Have a read of http://gis.stackexchange.com/questions/46893/how-do-i-get-the-pixel-value-of-a-gdal-raster-under-an-ogr-point-without-numpy to get the values of the soil points in the interpolated raster. This would be much easier in Esri if that's an option. – Michael Stimson Apr 02 '15 at 01:25
  • As @ChrisW said IDW by itself might not get you a good result for interpolation. Potentially take a look at this answer (http://gis.stackexchange.com/a/76315/150) – om_henners Apr 02 '15 at 03:34
  • And if Esri's ArcGIS isn't an option because you don't have access to it, QGIS is free, has tools to do point sampling from a raster, access to tools which can perform other interpolation methods, and hooks into more advanced geospatial tools than gdal might provide like PostGIS (and including gdal as well). – Chris W Apr 02 '15 at 18:15
  • the rain patterns are usually so unpredictable that the best interpolation method in this case is often... nearest neighbour. So a point to point spatial join should get your information, without the need for using grids... – radouxju Apr 02 '15 at 18:40
  • 1
    Thank you for the comments. ArcGIS wasn't the option as I wanted to use gdal libraries for python or R. Or, perhaps gdal console utilities. Generally, looking for tools which I can use in console mode. – Math_manul Apr 03 '15 at 02:58

0 Answers0