@@ -54,8 +54,8 @@ will only use the **drillholes.csv** table.
5454
5555Drill hole samples are always available in mining projects. They contain chemical
5656information for each rock sample (a cylinder) along the drill hole trajectories.
57- In this case, the data has been processed, and only the "X", "Y", "Z" coordinates
58- of the centroids of the cylinders were stored:
57+ In this case, the data has been processed, and only the ` Cartesian ` "X", "Y", "Z"
58+ coordinates of the centroids of the cylinders were stored:
5959
6060``` {julia}
6161url = "https://zenodo.org/record/7051975/files/drillholes.csv?download=1"
@@ -174,7 +174,7 @@ First, let's create our full `CartesianGrid` using the `boundingbox` of the traj
174174bbox = boundingbox(dtable.geometry)
175175
176176# size of blocks in meters
177- bsize = (25.0 , 25.0 , 12.5 )
177+ bsize = (25.0u"m" , 25.0u"m" , 12.5u"m" )
178178
179179# define Cartesian grid
180180grid = CartesianGrid(extrema(bbox)..., bsize)
@@ -213,37 +213,39 @@ blocks = view(grid, active)
213213
214214We would also like to filter ` Hexahedron ` s that are above the terrain.
215215Let's create a simple terrain elevation model by interpolating the vertical
216- "Z" coordinate of the first point of each trajectory:
216+ ` z ` coordinate of the first point of each trajectory:
217217
218218``` {julia}
219+ zcoord(point) = coords(point).z
220+
219221ztable = @chain dtable begin
220222 @groupby(:HOLEID)
221- @transform(:Z = last(to( :geometry) ), :geometry = shadow(:geometry))
222- @combine(:Z = first(:Z ), :geometry = first(:geometry))
223+ @transform(:z = zcoord( :geometry), :geometry = shadow(:geometry))
224+ @combine(:z = first(:z ), :geometry = first(:geometry))
223225end
224226```
225227
226- We perform the interpolation of the "Z" coordinate on the projected centroids of the blocks:
228+ We perform the interpolation of the ` z ` coordinate on the projected centroids of the blocks:
227229
228230``` {julia}
229231centroids = unique(shadow.(centroid.(blocks)))
230232
231- ztable = ztable |> Select("Z ") |> Interpolate(centroids, IDW())
233+ ztable = ztable |> Select("z ") |> Interpolate(centroids, IDW())
232234```
233235
234236``` {julia}
235237ztable |> viewer
236238```
237239
238- Finally, we can filter the blocks for which the "Z" coordinate is below the terrain:
240+ Finally, we can filter the blocks for which the ` z ` coordinate is below the terrain:
239241
240242``` {julia}
241243p(h) = shadow(centroid(h))
242- Z (h) = last(to( centroid(h) ))
244+ z (h) = zcoord( centroid(h))
243245
244- zdict = Dict(ztable.geometry .=> ztable.Z )
246+ zdict = Dict(ztable.geometry .=> ztable.z )
245247
246- active = findall(h -> Z (h) < zdict[p(h)], blocks)
248+ active = findall(h -> z (h) < zdict[p(h)], blocks)
247249
248250blocks = view(blocks, active)
249251```
0 commit comments