I had a need recently to create some contour maps plotted over basemaps, using randomly distributed data. Given that there has been a lot of recent changes in the geostatistical and mapping areas of R, it took me some time to work out just how I wanted to make my maps. Given that this is a rather large and somewhat confusing topic, I decided to document what I worked out. I hope this will be helpful to others who may need to traverse this path. My blog entry may be found below.
Summary of process
- Create geodetically proper data in geographic and/or projected coordinates
- Preliminary work : basemap, Area of Interest
- Plot contours of measurement point density
- Create a grid to define interpolation locations
- Build an interpolator using:
- Inverse distance weighted
- Kriging
- Spline fitting
- Thin-plate model
- Interpolate/Predict points onto the grid
- Calculate errors and plot
- Generate contours
- Plot contours over a basemap