# PolygonGeometry perPositionHeight attribute

**URL:** <https://community.cesium.com/t/polygongeometry-perpositionheight-attribute/963>\
**Category:** CesiumJS\
**Created:** [January 29, 2014, 11:26pm UTC](https://community.cesium.com/t/polygongeometry-perpositionheight-attribute/963 "2014-01-29T23:26:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerrold.stoy](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@jerrold.stoy](https://community.cesium.com/u/jerrold.stoy)\
**Post date:** [January 29, 2014, 11:26pm UTC](https://community.cesium.com/t/polygongeometry-perpositionheight-attribute/963/1 "2014-01-29T23:26:59Z")

</div>

When I create a polygon geometry with the perPositionHeight, and extrudedHeight attributes/options set, what is rendered on the screen is a polygon which goes down to the ground. The polygon extrusion/top appears correctly. I would have thought that the polygon base would have respected the perPositionHeight attribute as well. The height of each basepoint would be the position height of the corresponding point.

Thanks in advance  
Jerry

---

<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:** [January 31, 2014, 4:11pm UTC](https://community.cesium.com/t/polygongeometry-perpositionheight-attribute/963/2 "2014-01-31T16:11:52Z")

</div>

Hello Jerry,

The current implementation of PolygonGeometry only applies the perPositionHeight to the top of the extrusion. You can modify PolygonGeometryLIbrary.scaleToGeodeticHeightExtruded to change this.

In this function, minHeight is the height of the bottom of the extrusion and maxHeight is the height of the top. Currently, if perPositionHeight is true, maxHeight is added to the height of the top position (lines 87-91). Bottom positions are scaled to the surface of the ellipsoid then minHeight is added to that position (lines 79-82).

Best Regards,

Hannah

---

<div class="post-metadata">

**Author:** ![patrick.ht.janssen](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@patrick.ht.janssen](https://community.cesium.com/u/patrick.ht.janssen)\
**Post date:** [July 6, 2018, 9:12am UTC](https://community.cesium.com/t/polygongeometry-perpositionheight-attribute/963/3 "2018-07-06T09:12:37Z")

</div>

I have been searching for an answer to this question, but I cannot figure it out.

How to draw a polygon that floats in 3d, with points at different heights?

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [July 6, 2018, 8:15pm UTC](https://community.cesium.com/t/polygongeometry-perpositionheight-attribute/963/4 "2018-07-06T20:15:27Z")

</div>

Hey Patrick, please start a new thread for a separate topic/question. That’ll keep things organized. I think this is a good question that you should start a thread for, and I’d be happy to put together a full response there so people can easily find it in the future.
