Unify overlay level calculation for planar and ellipsoid projections#1543
Unify overlay level calculation for planar and ellipsoid projections#1543xawill wants to merge 1 commit intoNASA-AMMOS:masterfrom
Conversation
gkjohnson
left a comment
There was a problem hiding this comment.
Thanks for looking into this. I'm seeing that the quantized mesh with overlays demo is failing to load, now. Can you please test the demos to make sure they haven't broken?
|
|
||
| } | ||
|
|
||
| // TODO: should this be one layer higher LoD? |
There was a problem hiding this comment.
I think this comment can be removed?
There was a problem hiding this comment.
I don't know, you wrote it so I kept it. The diffs are a bit messed up, but notice it was there already on line 1478. I guess with the callback proposed in #1278 the issue is less important anyway.
| // the number of pixels per image on each axis | ||
| const wProj = resolution / w; | ||
| const hProj = resolution / h; | ||
| const { pixelWidth, pixelHeight } = this.tiling.getLevel( level ); |
There was a problem hiding this comment.
It's not guaranteed that every level is defined in a tiling scheme so we need to check if the layer is "null"
There was a problem hiding this comment.
The diffs are a bit messed up, but notice that the code is exactly the same as before. Do you mean that for ellipsoid projection it might happen and now that the code branch are merged this is a case to account for?
|
Okey, I'll take a look at the demos. |
|
@gkjohnson It looks like the demos were already broken before this PR (tried master, v0.4.23 and v0.4.22: all failing). This is my first time building locally the examples, so I might miss something, but it looks like Cesium authentication plugin might suddenly be incompatible with current Cesium API? Note that I can confirm I setup my access_token properly. Accessing the Cesium API with Postman using my token as a Bearer token works. So it looks like the |
This is a proposal to compute the ImageOverlay level for ellipsoid projection using pixel-density-based level calculation. This is the same approach already used for planar projection.
This allows tilesets having ancestor tiles without renderable content to use the ImageOverlayPlugin properly. In particular, this would solve #1280.
I ran the test suite and all tests passed.
Thank you for your consideration.