-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
If we would like to combine the pyramid data with data in other projections it would be best when the pyramid data is reprojected on the fly during interactions to the target projection of the plotting Axis. Therefore we would like to add this interaction into a dispatch of GeoAxis.
The code for the reprojection on the fly is
on(ax.finallimits) do limits
limext = Extents.extent(limits)
# Compute limit in raster projection
#todataproj = Proj.Transformation(plotcrs, rastercrs)
#@show plotcrs, rastercrs
trans = Proj.Transformation(plotcrs, rastercrs, always_xy=true)
datalimit = trans_bounds(trans, limext)
#datalimit = limext
#@show datalimit
if Extents.intersects(rasext, datalimit)
rasdata = selectlevel(pyramids, datalimit)
# Project selected data to plotcrs
#data.val = rasdata
data.val = Rasters.resample(rasdata, crs="EPSG:3857")
end
notify(data)
endThis is from this commit: https://github.com/JuliaDataCubes/PyramidScheme.jl/blob/fb8eba07376f04aed3b424e2994321fee0b58f0f/src/PyramidScheme.jl
Parts of this are still in the source code and should be taken out.