Skip to content

Conversation

juunie-roh
Copy link

@juunie-roh juunie-roh commented Aug 18, 2025

Description

This is an initial draft of migration from external library TypeScript implementation into Cesium development environment.

The naming conventions are not considered in this draft.

You can see the detailed description about this feature at the related issue, #12817.

Issue number and link

This PR relates to #12817.

Testing plan

You can see conducted unit tests at external library repository.

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

Copy link

Thank you for the pull request, @juunie-roh!

✅ We can confirm we have a CLA on file for you.

@juunie-roh
Copy link
Author

There is a limitation in the current implementation:

  • Cannot override higher zoom levels within configured terrain regions

For example:

  • Level 15 region configured with Provider A
  • Level 16+ in the same geographic area should use Provider B
  • Currently: Level 16+ continues using Provider A

What causes this is:

  • Simple region designation cannot change TerrainAvailability.
  • Once a region matches, it returns immediately without checking further options.

This could be solved by nesting HybridTerrainProvider instances, but I'm not sure if it's the right direction.

I haven't deeply investigated this limitation yet, as it may be an edge case.

@ggetz
Copy link
Contributor

ggetz commented Sep 29, 2025

Thanks for the PR @juunie-roh, and thanks for your patience!

Would you mind describing the use case(s) you're looking to address here? It seems like this PR address some, but not all, of the use cases we're looking into for #12817. For instance, I don't believe this handles showing multiple terrain surfaces simultaneously.

However, it does appear like this could be useful for many users and would likely still be worth consideration.

@juunie-roh
Copy link
Author

Hi, @ggetz ! 👋
You're right, that this is not for showing multiple terrains at once.
My specific use case was to integrate terrains from different sources seamlessly.
I set a global terrain fallback, then configured the specific area where needed to show terrain with different source.(higher resolution could be one of the example)
This implementation solves the problem by delegating requestTileGeometry to different terrain providers based on tile coordinates and zoom levels.

https://juun.vercel.app/cesium-utils/terrain
I have working demonstration here. The global fallback terrain with EllipsoidTerrainProvider, and configured area with Cesium's default provider at zoom level 13. (red-colored area).

@ggetz
Copy link
Contributor

ggetz commented Sep 30, 2025

Thanks @juunie-roh! Your demonstration looks to be working great.

We'll take a closer look at this PR and review shortly. Please let us know if there are any updates to the status of this PR in the meantime.

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