Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ LinearAlgebra = "1"
Makie = "0.24"
MapTiles = "1"
OrderedCollections = "1"
PointClouds = "0.3"
PointClouds = "1"
Proj = "1"
Scratch = "1"
Statistics = "1"
Expand Down
7 changes: 3 additions & 4 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ OSMMakie = "76b6901f-8821-46bb-9129-841bc9cfe677"
TileProviders = "263fe934-28e1-4ae9-998a-c2629c5fede6"
Tyler = "e170d443-b9d6-418a-9ee8-061e966341ef"

[compat]
DocumenterVitepress = ">=0.2"

[sources]
Tyler = {path = ".."}
Copy link
Collaborator

@lazarusA lazarusA Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one we need 😄 . CSV is the one I don't get why is failing. It complains that is not registered !

OSMMakie = {url = "https://github.com/MakieOrg/OSMMakie.jl", rev = "sd/makie-v0.24"}

[compat]
DocumenterVitepress = ">=0.2"
11 changes: 6 additions & 5 deletions src/provider/pointclouds/geotiles-pointcloud-provider.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ function load_tile_data(provider::GeoTilePointCloudProvider, path::String)
proj = provider.projs[Threads.threadid()]
points = get_points(pc, Point3f(pc.coord_offset), Point3f(pc.coord_scale), proj)
extrema = Point3f.(proj.(Point3f[pc.coord_min, pc.coord_max]))
if hasproperty(pc.points[1], :color_channels)
if !ismissing(PointClouds.IO.color_channels(pc.points[1]))
color = map(pc.points) do p
c = map(x -> N0f8(x / 255), p.color_channels)
return RGB(c[1], c[2], c[3])
c = PointClouds.IO.color_channels(p)
# TODO, PointClouds says values should be in 0-1 range, but they seem to require *255 to be in 0-1 range.
return RGB(c[1] * 255, c[2] * 255, c[3] * 255)
end
else
color = last.(points) # z as fallback
Expand Down Expand Up @@ -90,7 +91,7 @@ end

function get_points(las, offset, scale, proj)
return map(las.points) do p
point = Point3f(offset .+ Point3f(p.coords) .* scale)
point = Point3f(offset .+ Point3f(PointClouds.IO.coordinates(Integer, p)) .* scale)
Point3f(proj(point.data))
end
end
end
1 change: 1 addition & 0 deletions src/tile-plotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ function create_tileplot!(
markerspace=:data,
fxaa=false,
inspectable=false,
transparency=true,
config.attributes...
)
return p
Expand Down
10 changes: 5 additions & 5 deletions test/test-providers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ begin
lat, lon = (47.087441, 13.377214)
delta = 0.3
ext = Rect2f(lon - delta / 2, lat - delta / 2, delta, delta)
cfg = Tyler.PlotConfig(preprocess=pc -> map(p -> p .* 2, pc), shading=FastShading, material=mat, colormap=:alpine)
cfg = Tyler.PlotConfig(preprocess=pc -> map(p -> p .* 2, pc), shading=true, material=mat, colormap=:alpine)
m = Tyler.Map3D(ext; provider=ElevationProvider(nothing), plot_config=cfg)
end

Expand All @@ -66,7 +66,7 @@ begin
image = ElevationProvider(nothing)
cfg = Tyler.MeshScatterPlotconfig(markersize=5, marker=Rect3f(Vec3f(0), Vec3f(1)))
m1 = Tyler.Map3D(ext; provider=provider, plot_config=cfg, max_parallel_downloads=1)
cfg = Tyler.PlotConfig(preprocess=pc -> map(p -> p .* 2, pc), shading=FastShading, colormap=:alpine, postprocess=(p-> translate!(p, 0, 0, -1f0)))
cfg = Tyler.PlotConfig(preprocess=pc -> map(p -> p .* 2, pc), shading=true, colormap=:alpine, postprocess=(p-> translate!(p, 0, 0, -1f0)))
m2 = Tyler.Map3D(m1; provider=image, plot_config=cfg, max_parallel_downloads=1)
m1
end
Expand All @@ -83,7 +83,7 @@ begin
# subset = "AHN4_T" # Takes _really_ long to load, even from disk (~300mb compressed points per tile)
provider = GeoTilePointCloudProvider(subset=subset)
m1 = Tyler.Map3D(ext; provider=provider, max_parallel_downloads=1)
cfg = Tyler.PlotConfig(shading=FastShading, colormap=:alpine, postprocess=(p -> translate!(p, 0, 0, -100.0f0)))
cfg = Tyler.PlotConfig(shading=true, colormap=:alpine, postprocess=(p -> translate!(p, 0, 0, -100.0f0)))
m2 = Tyler.Map3D(ext; provider=ElevationProvider(), figure=m1.figure, axis=m1.axis, max_parallel_downloads=1, plot_config=cfg)
m1
end
Expand Down Expand Up @@ -170,7 +170,7 @@ begin
delta = 0.5
ext = Rect2f(lon - delta / 2, lat - delta / 2, delta, delta)
mat = (type=:Uber, roughness=0.2, ior=1.390)
cfg = Tyler.PlotConfig(preprocess=pc -> map(p -> p .* 2, pc), shading=FastShading, material=plastic, colormap=:alpine)
cfg = Tyler.PlotConfig(preprocess=pc -> map(p -> p .* 2, pc), shading=true, material=plastic, colormap=:alpine)
m = Tyler.Map3D(ext; provider=ElevationProvider(nothing), plot_config=cfg, max_plots=5)
render_rpr(m, "alpine", 10000000)
end
Expand All @@ -185,7 +185,7 @@ begin
mat = plastic_material()
cfg = Tyler.MeshScatterPlotconfig(markersize=5, material=mat)
m = Tyler.Map3D(ext; provider=provider, plot_config=cfg, max_plots=3, size=(2000, 2000))
cfg = Tyler.PlotConfig(preprocess=pc -> map(p -> p .* 2, pc), shading=FastShading, material=mat, colormap=:Blues)
cfg = Tyler.PlotConfig(preprocess=pc -> map(p -> p .* 2, pc), shading=true, material=mat, colormap=:Blues)
m2 = Tyler.Map3D(m; provider=ElevationProvider(nothing), plot_config=cfg, max_plots=5)
wait(m)
render_rpr(m, "pointclouds")
Expand Down
Loading