Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ElevationProvider colors are likely half a gridcell off #112

Open
asinghvi17 opened this issue Nov 25, 2024 · 0 comments
Open

ElevationProvider colors are likely half a gridcell off #112

asinghvi17 opened this issue Nov 25, 2024 · 0 comments

Comments

@asinghvi17
Copy link
Member

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant