Skip to content

Commit 6683a17

Browse files
committed
🏇🏼 Add examples
1 parent cef5546 commit 6683a17

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

example/fileio.jl

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
using FastPointQuery
2+
using WGLMakie
23

34
points = rand(2, 100)
45
saveply(points, joinpath(@__DIR__, "pointcloud.ply"))
5-
readply(joinpath(@__DIR__, "pointcloud.ply"), xy=true)
6+
readply(joinpath(@__DIR__, "pointcloud.ply"), xy=true)
7+
8+
tiff_file = joinpath(@__DIR__, "akatani.tiff")
9+
10+
xyz = readtiff(tiff_file, dst_crs="+proj=tmerc +lat_0=0 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0 +ellps=clrk66 +units=m +no_defs")#, dst_crs="EPSG:3099")
11+
xyz1 = readtiff(tiff_file, dst_crs="EPSG:3099")
12+
vmin = minimum(xyz, dims=2)
13+
xyz[1, :] .-= vmin[1]
14+
xyz[2, :] .-= vmin[2]
15+
vmin1 = minimum(xyz1, dims=2)
16+
xyz1[1, :] .-= vmin1[1]
17+
xyz1[2, :] .-= vmin1[2]
18+
19+
let
20+
fig = Figure()
21+
ax = LScene(fig[1, 1])
22+
surface!(ax, xyz1[1, :], xyz1[2, :], xyz1[3, :], colormap=:terrain)
23+
display(fig)
24+
end
25+
26+
xyz = readasc(joinpath(@__DIR__, "dem1.asc"))
27+
vmin = minimum(xyz, dims=2)
28+
xyz[1, :] .-= vmin[1]
29+
xyz[2, :] .-= vmin[2]
30+
31+
let
32+
fig = Figure()
33+
ax = LScene(fig[1, 1])
34+
surface!(ax, xyz[1, :], xyz[2, :], xyz[3, :], colormap=:terrain)
35+
display(fig)
36+
end

0 commit comments

Comments
 (0)