Skip to content

Add plot dispatch on GeoAxis and Pyramid #45

@felixcremer

Description

@felixcremer

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)
    end

This 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions