-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Non-Geospatial Tiling Example #4328
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
Non-Geospatial Tiling Example #4328
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Observation: Right now using the tile layer for this purpose requires writing a few small callbacks. While this is very clean and minimal for JS programmers, it is still not simple enough to be used from purely declarative versions of the deck.gl API, such as deck.gl JSON / pydeck.
@ilan-gold As a potential next step, it could be fun to consider what would be needed to make this into a purely declarative playground example, see
- https://deck.gl/playground/
- https://github.com/uber/deck.gl/tree/master/examples/playground/json-examples
Doing that may not align with your interests, in that case no worries, you have already taken this very far! But it declarative support seems fun, I would be happy to support you on that track.
examples/website/image-tile/app.js
Outdated
.then(str => new window.DOMParser().parseFromString(str, 'text/xml')) | ||
.then(dziXML => { | ||
if (Number(dziXML.getElementsByTagName('Image')[0].attributes.Overlap.value) !== 0) { | ||
throw new Error('Overlap paramter is nonzero and should be 0'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- typo
paremter
- Is this a common condition that needs to be called out?
- Maybe state that the error in in the
dziSource
file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can fix the "parameter" spelling. I suppose we could throw a warning instead - the idea here is that we don't want "overlap" because that would be visible (i.e we would see some tile boundary artifacts). Apparently libraries like OpenSeaDragon like it because they can blend tile boundaries better. Without the overlap, there are sometimes artifacts although they are far less noticeable than having overlap and not handling it, in my opinion. Furthermore, I think more complex applications can handle the artifacts at a lower level (i.e in gl
settings or on shaders).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I would also lean towards going with console.warn
- if we can still render the tilesets, albeit with some artifacts.
This is something we could be interested, especially |
@@ -0,0 +1,19 @@ | |||
This is a standalone high resolution image example using TileLayer and BitmapLayer, with non-geospatial coordinates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be very helpful to other users if you also explain how the tiles are generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed below.
Hey just wanted to chime in and say thanks for this example! I just got into a fun weekend project to use deck in a non-geospatial application, and it was perfect. |
No problem! It was fun! |
Do you know why the zoom settings are the way they are? I see I'd like my tiles to be 16x16 (my image isn't huge in size, and it's an 8-bit style thing). |
The The Hope this helps! |
Following up on #4230 (comment), this is the tiling example. This is in conjunction with the data being merged on to master here: visgl/deck.gl-data#15. We should probably hold off on merging this PR until we can test the raw data on master there locally.
Background
After @Pessimistress merged #4246 I am giving an example here of the non-geospatial use-case, displaying the capability and also matoivating future creation of a new controller that has smoother zoom/pan as per #4230 (comment)
Change List