problem clamping Geojson

Hey there,
This should be an easy issue, but I couldn’t figure out what’s wrong.

I have a set of geojson files, I import the files while setting them to clamp to terrain and disable the outline, some of the files (3 of them ) do not clamp and they maintain the default (yellow) outline.

the river (blue) and the road(orange) aren’t clamped to the terrain while the red circular feature (bottom) are clamped just fine. the third feature is at 0 height. so its deeply under ground (this is mountain area)

I’m using these options below:

{clampToGround : true,fill:Cesium.Color.BLUE.withAlpha(0.3),outline:false}


Also, the depthTestAgainstTerrain is true. I have attached one of the files

tuek_river.geojson (283 KB)

Hi there,

I don’t see any reason why your ground clamping shouldn’t work. Double check that you’ve set the option to true, and you might also want to check if height is set. Ground clamping only works if height is set to undefined.


  • Rachel

Hi Rachel,
actually the height value was set to some values, I have removed heights from the “geometry”, and it worked.

Thanks a lot for pointing to this matter :slight_smile: