# terrain height scale

**URL:** <https://community.cesium.com/t/terrain-height-scale/3262>\
**Category:** CesiumJS\
**Created:** [November 3, 2015, 7:58pm UTC](https://community.cesium.com/t/terrain-height-scale/3262 "2015-11-03T19:58:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rogers\_Susan](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@Rogers\_Susan](https://community.cesium.com/u/Rogers_Susan)\
**Post date:** [November 3, 2015, 7:58pm UTC](https://community.cesium.com/t/terrain-height-scale/3262/1 "2015-11-03T19:58:04Z")

</div>

Hi,

I have some custom terrain data that displays in Cesium via

var terrainProvider = new Cesium.CesiumTerrainProvider({  
&nbsp;&nbsp;url : ‘http://…/tilesets/terrain/’  
&nbsp;&nbsp;&nbsp;&nbsp;});

I would like to adjust the terrain height scale in the Cesium code. What code can add to my main html to exaggerate the elevations by a multiplicative constant? Or, what would I need to modify in CesiumTerrainProvider.js?

Thanks for your help!

Renee

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [November 3, 2015, 9:15pm UTC](https://community.cesium.com/t/terrain-height-scale/3262/2 "2015-11-03T21:15:46Z")

</div>

Hello Renee,

Sorry, this functionality isn’t currently supported in Cesium.

Best,

Hannah

---

<div class="post-metadata">

**Author:** ![Rogers\_Susan](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@Rogers\_Susan](https://community.cesium.com/u/Rogers_Susan)\
**Post date:** [November 4, 2015, 5:55pm UTC](https://community.cesium.com/t/terrain-height-scale/3262/3 "2015-11-04T17:55:07Z")

</div>

Thank you for responding,

I was able to change the terrain height scale by modifying

CesiumTerrainProvider.js line 189  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data.format === 'heightmap-1.0') {  
&n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bsp;&nbsp;&nbsp;&nbsp;&nbsp;isBigEndian : false  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};

How do I modify the czml so that geometries and billboards relate to the new height scale?  
Thanks,

Renee

---

<div class="post-metadata">

**Author:** ![Matt\_Amato](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/matt_amato/32/1993_2.png) [@Matt\_Amato](https://community.cesium.com/u/Matt_Amato)\
**Post date:** [November 5, 2015, 4:32pm UTC](https://community.cesium.com/t/terrain-height-scale/3262/4 "2015-11-05T16:32:31Z")

</div>

Susan, we are actually getting ready to add this feature officially to Cesium and it should even be ready by the next release (December 1st).

Unfortunately, CZML doesn’t currently have any way to specify data as being “on terrain”, but that’s also something we are planning on adding in the coming months. We’ll try to remember to come back and update this post when something is ready for you to play with. Until then, you’re only real option for billboards is to either specify the exaggerated heights inside of the CZML file or change them dynamically on the client as needed. There are no good options for geometry as far as CZML is concerned, but like I said, we are working on it.

---

<div class="post-metadata">

**Author:** ![Rogers\_Susan](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@Rogers\_Susan](https://community.cesium.com/u/Rogers_Susan)\
**Post date:** [November 5, 2015, 4:40pm UTC](https://community.cesium.com/t/terrain-height-scale/3262/5 "2015-11-05T16:40:58Z")

</div>

Matthew, Thank you for this upcoming new feature. I look forward to it. I implemented the exaggerated heights inside the CZML points and billboards, just as you suggested and it does work. Great work on Cesium,

Susan Renee
