-
Notifications
You must be signed in to change notification settings - Fork 353
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
Add clampToGround
to kml
#6952
base: main
Are you sure you want to change the base?
Add clampToGround
to kml
#6952
Conversation
@nf-s |
@nf-s Hiroo |
Hi @imakihi I looked into this a bit more and I have removed the polygon clamp feature. Cesium now has a This means that KML files with 3D polygons that have We still need to do some testing - but I think this is a better way forward than before, where Terria was manually overriding coordinate heights. What do you think @steve9164 ? |
Hi @nf-s |
Hi @imakihi That would be great, thanks! |
@nf-s
Except relative to ground, I think, it worked. When I drag and drop my test file for the relative to ground, it doesn't clump, I think. These are my test files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes look good. Have you had time to test the KMLs?
I tested the KMLs, but couldn't find a difference between To be honest, I find it quite difficult to figure out exactly how Basically - if
Anyway, I think we should just merge this in. This respects KML features (and altitude mode), and correctly passes |
Add
clampToGround
to kmlFixes #6799
Related to
Terria used to clamp 2D and 3D KML polygon features to ground, and there was no way to turn it off. I have removed Terria's clamping, added a
clampToGround
trait, and now we pass that intoKmlDataSource.load()
- where cesium will now handle clampingclampToGround
will default totrue
- but Cesium will respectaltitudeMode
in KML - so it won't clamp 3D polygons that havealtitudeMode
set toabsolute
orrelativeToGround
.There is a weird behaviour where KML polygons will only be clamped if in 3d (cesium) mode, this is because when
loadMapItems
is loaded, cesium terrain is sampled to clamp polygon features. This is now fixed.Test me
clampToGround
value)clampToGround
is true (set mode to 3d terrain)Checklist
doc/
.