Skip to content
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

3DTILES_bounding_volume_s2 should join PROJ in supporting ellipsoidal lat/lon -> XYZ conversions #716

Open
elfprince13 opened this issue Oct 21, 2022 · 0 comments

Comments

@elfprince13
Copy link

elfprince13 commented Oct 21, 2022

The PROJ implementation of S2 supports cutting cell boundaries using a lat/lon -> XYZ mapping that accounts for the difference between geodetic and geocentric lat/lon coordinates on general ellipsoids. While this is mostly irrelevant for storage of vector data (point clouds, polygons, etc), it is quite helpful in minimizing length-distortions when warping raster data into S2 coordinates to cleanly slice along S2 cell boundaries.

The existing implementation of S2Cell.js in CesiumGS/cesium can be made to emulate this behavior by replacing the two instances of Ellipsoid.UNIT_SPHERE with new Ellipsoid(1.0, 1.0, ellipsoid.minimumRadius / ellipsoid.maximumRadius).

Presumably a similar change can be made in CesiumGS/cesium-native, although I am less familiar with that codebase.

However a more desirable solution would be for this extension to define a setting to allow the aspect ratio of Cesium's planetary ellipsoid (typically WGS84) to be used in place of the unit sphere for calculating lat/lon -> XYZ conversions.

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

No branches or pull requests

1 participant