Skip to content

Unify overlay level calculation for planar and ellipsoid projections#1543

Open
xawill wants to merge 1 commit intoNASA-AMMOS:masterfrom
xawill:ellipsoid-overlay-calculateLevel
Open

Unify overlay level calculation for planar and ellipsoid projections#1543
xawill wants to merge 1 commit intoNASA-AMMOS:masterfrom
xawill:ellipsoid-overlay-calculateLevel

Conversation

@xawill
Copy link
Copy Markdown
Contributor

@xawill xawill commented Apr 1, 2026

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.

Copy link
Copy Markdown
Contributor

@gkjohnson gkjohnson left a comment

Choose a reason for hiding this comment

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

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?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this comment can be removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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 );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's not guaranteed that every level is defined in a tiling scheme so we need to check if the layer is "null"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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?

@xawill
Copy link
Copy Markdown
Contributor Author

xawill commented Apr 4, 2026

Okey, I'll take a look at the demos.

@xawill
Copy link
Copy Markdown
Contributor Author

xawill commented Apr 5, 2026

@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 access_token query string is not supported anymore?

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.

2 participants