@@ -9,6 +9,12 @@ using GeoStats
99import CairoMakie as Mke
1010```
1111
12+ ``` {julia}
13+ #| echo: false
14+ #| output: false
15+ Mke.activate!(type = "png")
16+ ```
17+
1218A very common task in geospatial data science is ** geospatial interpolation** ,
1319i.e., predicting variables on geometries that lie between two or more geometries that
1420have measurements. In this chapter, we will exploit ** geospatial correlation**
@@ -60,7 +66,7 @@ With the measurements of the variable `z` in the geotable, and the domain of
6066interpolation, we can use the ` Interpolate ` transform with the ` IDW ` model:
6167
6268``` {julia}
63- interp = data |> Interpolate(grid, IDW())
69+ interp = data |> Interpolate(grid, model= IDW())
6470```
6571
6672``` {julia}
@@ -90,7 +96,7 @@ increasing values of the exponent:
9096fig = Mke.Figure()
9197Mke.Axis(fig[1,1])
9298for β in [1,2,3,4,5]
93- interp = data |> Interpolate(grid, IDW(β))
99+ interp = data |> Interpolate(grid, model= IDW(β))
94100 Mke.lines!(interp[seg, "z"], label = "β=$β")
95101end
96102Mke.axislegend(position = :lb)
@@ -102,7 +108,7 @@ between the two locations. In addition, the IDW solution will converge
102108to the nearest neighbor solution as $\beta \to \infty$:
103109
104110``` {julia}
105- data |> Interpolate(grid, IDW(100)) |> viewer
111+ data |> Interpolate(grid, model= IDW(100)) |> viewer
106112```
107113
108114Custom distances from [ Distances.jl] ( https://github.com/JuliaStats/Distances.jl )
@@ -152,7 +158,7 @@ to improvements in the estimates:
152158``` {julia}
153159γ = GaussianVariogram(range=30.0)
154160
155- data |> Interpolate(grid, Kriging(γ)) |> viewer
161+ data |> Interpolate(grid, model= Kriging(γ)) |> viewer
156162```
157163
158164In the previous chapter, we learned how the ** range** of the variogram determines
@@ -164,7 +170,7 @@ fig = Mke.Figure()
164170Mke.Axis(fig[1,1])
165171for r in [10,20,30,40,50]
166172 γ = GaussianVariogram(range=r)
167- interp = data |> Interpolate(grid, Kriging(γ))
173+ interp = data |> Interpolate(grid, model= Kriging(γ))
168174 Mke.lines!(interp[seg, "z"], label = "range=$r")
169175end
170176Mke.axislegend(position = :lb)
@@ -252,7 +258,7 @@ fit the `Kriging` model with a maximum number of neighbors with the
252258` InterpolateNeighbors ` transform:
253259
254260``` {julia}
255- interp = samples |> InterpolateNeighbors(img.geometry, Kriging(γ))
261+ interp = samples |> InterpolateNeighbors(img.geometry, model= Kriging(γ))
256262```
257263
258264``` {julia}
0 commit comments