Skip to content

ElevationProvider colors are likely half a gridcell off #112

@asinghvi17

Description

@asinghvi17

Consider

function create_tileplot!(config::PlotConfig, axis::AbstractAxis, data::ElevationData, bounds::Rect, tile_crs)
# not so elegant with empty array, we may want to make this a bit nicer going forward
color = isempty(data.color) ? (;) : (color=data.color,)
mini, maxi = extrema(bounds)
uv_transform = isempty(data.color) ? Makie.automatic : Mat{2,3,Float32}(0, 1, 1, 0, 0, 0)
p = Makie.surface!(
axis.scene,
(mini[1], maxi[1]), (mini[2], maxi[2]), data.elevation;
color...,
uv_transform = uv_transform,
shading=Makie.NoShading,
inspectable=false,
colorrange=data.elevation_range,
config.attributes...
)
return p
end

It turns out that image sample points are supposed to lie between elevation sample points. Not a huge deal - but at a high zoom level where you only have one tile it may prove to be very necessary.

Image

Just putting this out there in case anyone is interested in solving it and has free time, this isn't a dealbreaker from my perspective. It might be that we can get away with an adjustment to surface's uv_transform attribute.

cf. https://developers.arcgis.com/documentation/tiled-elevation-service/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions