I have a shp file showing locations of various wells on a site. I have linked (joined) a csv file of analytical results to this file. I am now looking for a method to generate contours based upon the analytical results. Idea been to identify by contours areas of similar analytical concentrations. Any ideas?

1 Answer 1


First you will want to generate a raster surface. To do that you want to start with points with values. You should be able to create a point file with the values from the analytical results that you have (assuming you have coordinate values in your table). Then the size of the raster surface that you create will depend on the spatial density of points that you have. It is best if you have at least one point (better with a few points) for every cell in the raster.

To create the surface you must use some method of interpolation. You can use Kriging and get into the whole art of creating a surface or use an easier method like IDW (I recommend IDW). This is available with Spatial Analyst (in that toolbox). If you are using QGIS see Spatial Analysis (Interpolation) and Inverse Distance Weighted.

Next typically to make smooth contours, you want to smooth your raster surface. NOTE: This degrades the data, so you might want to try using unsmoothed data to see how it looks.

Optional Smoothing: Use FocalStatistics and a Mean (I've used a 9x9 neighborhood to good effect). Focal Statistics is in the Spatial Analyst toolbox and from what I understand there is a method for doing this with GRASS see ... "Is there a Focal Statistics (spatial analyst) tool in ArcGIS equivalent in QGIS?"

Next whether you smoothed the raster or not, you are ready to generate contours. In ArcMap the Contour Tool is again under spatial analyst tools. but you can generate contours at the OSGEO4W shell with the command gdal_contour. Here is a sample command that I've used.

gdal_contour -a contour inputraster output.shp -i 10

And that will create contours in intervals of 10 (most commonly feet or meters but in your case it will be in intervals of whatever units your analytical results are measured in).

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.