GitHub repository for the project: https://github.com/MicheleTobias/CurvilinearAnisotropy
Traditional approaches to interpolating a surface from point samples often assume that if anisotropy is present in the data, it is along a straight line. However, this assumption breaks down for many data-sets, such as river bathymetry, elevations near coastlines, or levels of pollutants along roads. I will present a work-flow using open source tools to make use of the curvilinear anisotropy present in many data-sets by transforming the curved data-set into a straight line (QGIS and PostGIS), applying an interpolation to the transformed data (with R... or use SAGA, GRASS, or other program with interpolation tools), and finally re-bending the interpolated surface back to the data's original shape (PostGIS).
Hot Call Girls |Delhi |Preet Vihar ☎ 9711199171 Book Your One night Stand
Open Source Work-flow for Surface Interpolation with Curvilinear Anisotropy
1. Open Source Work-flow for
Surface Interpolation with
Curvilinear Anisotropy
Michele Tobias, PhD
Geospatial Consulting @ UC Davis ● University of California Davis
FOSS4G ● Portland, OR ● Sept. 8-13, 2014
@MicheleTobias @GeospatialUCD
2. Question: How do you accurately interpolate
depths for a meandering river channel?
@MicheleTobias @GeospatialUCD
9. CREATE TABLE points_sn AS
SELECT
points.gid,
points.bed_elevat AS depth,
st_distance(line.geom, points.geom) AS N,
st_line_locate_point(st_linemerge(line.geom),
points.geom) * st_length(st_linemerge(line.geom))
AS S,
points.easting AS X, points.northing AS Y,
st_makepoint(st_distance(line.geom, points.geom),
st_line_locate_point(st_linemerge(line.geom),
points.geom) * st_length(st_linemerge(line.geom)))
AS geom
FROM referenceline AS line, willamette_points AS
points
@MicheleTobias @GeospatialUCD
In PostGIS: Transform the Depth Data
10. CREATE TABLE rivergrid_sn as
SELECT
points.gid,
st_distance(line.geom, points.geom) AS N,
st_line_locate_point(st_linemerge(line.geom),
points.geom) * st_length(st_linemerge(line.geom))
AS S,
st_makepoint(st_distance(line.geom, points.geom),
st_line_locate_point(st_linemerge(line.geom),
points.geom) * st_length(st_linemerge(line.geom)))
AS geom
FROM
referenceline AS line, gridpoints AS points
@MicheleTobias @GeospatialUCD
In PostGIS: Transform the River Grid
11. Interpolation
In R or your favorite GIS
vgm.data<-vgm(
psill=2.8,
model="Exp",
range=1100,
nugget=0.58,
anis=c(0,.01))
vgm.dir=variogram(Depth
~1, data.sn, alpha = 0)
plot(vgm.dir, vgm.data)
@MicheleTobias @GeospatialUCD
Fit a Variogram
gstat
Package
12. Interpolation
In R or your favorite GIS
data.kriged<- krige(
Depth~1,
locations=data.sn,
model=vgm.data,
newdata=rivergrid)
spplot(data.kriged["var1.pred"])
@MicheleTobias @GeospatialUCD
Interpolation
13. Re-bend the Estimates
Join the estimates back to the grid in real world coordinates
In PostGIS
UPDATE gridpoints
SET estimates = krigedpoints.estimates
FROM krigedpoints
WHERE gridpoints.gid=krigedpoints.gid
@MicheleTobias @GeospatialUCD
14. Post-Processing
In QGIS
@MicheleTobias @GeospatialUCD
Estimates Referenced
To Grid Points
Raster from Points Contours