Skip to content

Conversation

ilan-gold
Copy link
Collaborator

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

  • Add a non-geospatial tiling example

@coveralls
Copy link

coveralls commented Feb 27, 2020

Coverage Status

Coverage increased (+0.5%) to 80.337% when pulling 3e5b205 on ilan-gold:ilan-gold/non_geo_tiling_example into 3e7cc11 on uber:master.

Copy link
Collaborator

@ibgreen ibgreen left a 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

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.

.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');
Copy link
Collaborator

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?

Copy link
Collaborator Author

@ilan-gold ilan-gold Feb 27, 2020

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

Copy link
Collaborator

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.

@ilan-gold
Copy link
Collaborator Author

ilan-gold commented Feb 27, 2020

This is something we could be interested, especially pydeck. I will be getting back to you on that in the near future, I think - I would likely be happy to implement that. It has been on my radar for a bit.

@@ -0,0 +1,19 @@
This is a standalone high resolution image example using TileLayer and BitmapLayer, with non-geospatial coordinates
Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed below.

@Pessimistress Pessimistress merged commit 181dc2a into visgl:master Mar 7, 2020
@chrisgervang
Copy link
Collaborator

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.

@ilan-gold
Copy link
Collaborator Author

No problem! It was fun!

@chrisgervang
Copy link
Collaborator

Do you know why the zoom settings are the way they are? I see ${15 + z} and a min zoom of -7, max of 0. Kinda wondering how that relates to tile size?

I'd like my tiles to be 16x16 (my image isn't huge in size, and it's an 8-bit style thing).

@ilan-gold
Copy link
Collaborator Author

The minZoom is arbitrary but is there more to highlight that the extent prop works as expected - as you zoom past the minZoom level the image does not disappear.

The + 15 is just to create the url for the DeepZoom pyramid - their numbering system is flipped from deck.gl. So 0 zoom level in deck.gl is really the 15th in DeepZoom, -1 is 14 etc.

Hope this helps!

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

Successfully merging this pull request may close these issues.

5 participants