# KML file

**URL:** <https://community.cesium.com/t/kml-file/5575>\
**Category:** CesiumJS\
**Created:** [May 31, 2017, 7:14am UTC](https://community.cesium.com/t/kml-file/5575 "2017-05-31T07:14:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![safe\_amd](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@safe\_amd](https://community.cesium.com/u/safe_amd)\
**Post date:** [May 31, 2017, 7:14am UTC](https://community.cesium.com/t/kml-file/5575/1 "2017-05-31T07:14:36Z")

</div>

i have to work on sandcastle with specific kml file and im working with the cartographic representation of buildings , is there a way to convert the kml file to this type of representation automatically ?

What i mean by the cartographic representation :

var building = ellipsoid.WGS84.cartographicArrayToCartesianArray(

[ Cesium.Cartographic.fromDegrees(15.045825395539099,52.40883222994816,7.670000000000002),

Cesium.Cartographic.fromDegrees(15.045816328061415,52.40883412104174,7.670000000000002),

Cesium.Cartographic.fromDegrees(15.045897718848895,52.40900085928126,7.670000000000002),

Cesium.Cartographic.fromDegrees(15.045908823045192,52.40899879495449,7.670000000000002)

]);

---

<div class="post-metadata">

**Author:** ![Rachel\_Hwang](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@Rachel\_Hwang](https://community.cesium.com/u/Rachel_Hwang)\
**Post date:** [June 5, 2017, 3:42pm UTC](https://community.cesium.com/t/kml-file/5575/2 "2017-06-05T15:42:46Z")

</div>

Hi there,

You should be able to load your KML file, then iterate through the entities and do whatever conversions you need. Here’s a code example: [http://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=a2eb5d9f07eda4018d134c46d8fab339](http://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=a2eb5d9f07eda4018d134c46d8fab339)

Hope that helps,

- Rachel

---

<div class="post-metadata">

**Author:** ![safe\_amd](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@safe\_amd](https://community.cesium.com/u/safe_amd)\
**Post date:** [June 6, 2017, 2:35am UTC](https://community.cesium.com/t/kml-file/5575/3 "2017-06-06T02:35:28Z")

</div>

Hi ,

I tried it but sandcastle gives two type of error " Unsupported geometry: Model " and "Placemark Regions are unsupported " .

---

<div class="post-metadata">

**Author:** ![Rachel\_Hwang](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@Rachel\_Hwang](https://community.cesium.com/u/Rachel_Hwang)\
**Post date:** [June 6, 2017, 2:47pm UTC](https://community.cesium.com/t/kml-file/5575/4 "2017-06-06T14:47:14Z")

</div>

Hi there,

For the Placemark region error, unfortunately we don’t currently have support for regions of that type. See this thread for a suggested workaround: [https://groups.google.com/d/msg/cesium-dev/lBBxGZlk9tc/\_Ui4GkohBgAJ](https://groups.google.com/d/msg/cesium-dev/lBBxGZlk9tc/_Ui4GkohBgAJ)

As for the model error, can you give me more information about what you’re trying to load?

Hope that helps,

- Rachel
