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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raster Tile Rendering #71

Open
maxammann opened this issue May 3, 2022 · 10 comments
Open

Raster Tile Rendering #71

maxammann opened this issue May 3, 2022 · 10 comments
Labels
blocked Issue is currently blocked by some other issue feature-request Request for a new feature

Comments

@maxammann
Copy link
Collaborator

We want to be able to render raster tiles. This is required for rendering data sets like "Natural Earth". Raster tiles can be of any web-native image format like PNG or WEBP.

馃 Expected Behavior

Raster tiles need to be scaled and transformed like vector tiles.

馃槸 Current Behavior

No raster tiles are supported.

馃拋 Possible Solution

The WebGPU spec offers a way to load bitmaps to textures: https://toji.github.io/webgpu-best-practices/img-textures.html
In the browser this requires the createImageBitmap() API which offloads decoding of images to the browser.

馃敠 Context

馃捇 Examples

@maxammann maxammann added the feature-request Request for a new feature label May 3, 2022
@ybiletskyi
Copy link
Contributor

Any ideas about implementation of this feature?

@maxammann maxammann added the blocked Issue is currently blocked by some other issue label Jun 3, 2022
@maxammann
Copy link
Collaborator Author

This is currently blocked by wgpu. The copyExternalImageToTexture is not yet available and need to be implemented in wgpu. The devs of wgpu said that this is probably not very hard to do.
So if you want to work on this then this would be a valuable contribution :)

@ybiletskyi
Copy link
Contributor

Got it. Thanks for update. I'll try to implement it in wgpu.

@quietlychris
Copy link
Sponsor

Just as a note: I have a personal interest in this feature! At the moment, I'm using MapLibre (JavaScript) on my personal site to overlay .webp images of environmental drone imagery I've collected. The site's backend is actually written in Rust, and I'd love the opportunity to re-write this particular application with maplibre-rs as well, which is dependent on raster imagery being available (and symbols). Really excited about this project, so just wanted to mention a use case I'd personally be delighted to have support for at some point. I don't have a ton of capacity for new contributions at the moment, but if you need support for something like testing for either this project or the wgpu feature, just let me know!

@ybiletskyi
Copy link
Contributor

Hey. I just created a PR to wgpu. It probably take a time to merge it. But it's not a blocker any more for start this feature implementation.

@maxammann
Copy link
Collaborator Author

@ybiletskyi, @quillasp might also be interested in working on this as part of his bachelor thesis. I wondered whether collaboration could make sense. If not it shouldn't be hard to find two distinct areas to work on in maplibre-rs.

@ybiletskyi
Copy link
Contributor

It's not a problem for collaboration. I'll be happy to work with @quillasp. But need to analyze and estimate amount of work. Maybe this feature not so big for 2 dev collaboration. In that case I might to switch to another feature.

@maxammann
Copy link
Collaborator Author

@Drabble can you check with @quillasp?

@quillasp
Copy link

@Drabble gave me an overview of the project today. But the project is still quite big (for me at least), do you have any idea where I should start looking in the code to see where I could implement the basics of this feature ? (sorry for the noob question)

@ybiletskyi
Copy link
Contributor

Probably you should add new layer with type raster link that represent raster tiles on a map. Than you add logic for loading data (io module I supose) and processing data. After that I think you can start to render data.

@quillasp quillasp mentioned this issue Jun 29, 2022
3 tasks
@quillasp quillasp mentioned this issue Nov 11, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Issue is currently blocked by some other issue feature-request Request for a new feature
Projects
None yet
Development

No branches or pull requests

4 participants