# ESRI shape vector to Cesium map

**URL:** <https://community.cesium.com/t/esri-shape-vector-to-cesium-map/6322>\
**Category:** CesiumJS\
**Created:** [December 4, 2017, 7:33am UTC](https://community.cesium.com/t/esri-shape-vector-to-cesium-map/6322 "2017-12-04T07:33:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![juhokok25](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@juhokok25](https://community.cesium.com/u/juhokok25)\
**Post date:** [December 4, 2017, 7:33am UTC](https://community.cesium.com/t/esri-shape-vector-to-cesium-map/6322/1 "2017-12-04T07:33:12Z")

</div>

Hi

Let's assume that i have a plenty ESRI shape files in region of Finland. What would be the best way to bring them on cesium map as a "offline" data (i cannot use web map servers at all the times).

I've read you have 3dtiles, czml and kml support, is there more options?  
How i can convert data for examble shp to 3d tiles? is there any open sorce softwares for that?

Currently i run cesium version 1.38

Thanks!

---

<div class="post-metadata">

**Author:** ![sean\_lilley](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/sean_lilley/32/2083_2.png) [@sean\_lilley](https://community.cesium.com/u/sean_lilley)\
**Post date:** [December 5, 2017, 12:51am UTC](https://community.cesium.com/t/esri-shape-vector-to-cesium-map/6322/2 "2017-12-05T00:51:03Z")

</div>

I don’t know if there is open source software for converting shapefiles to 3D Tiles. We have a tool in our internal tiling pipeline for doing that (not open source), if you send over the data I could try converting it for you.

---

<div class="post-metadata">

**Author:** ![paula.malec1](https://avatars.discourse-cdn.com/v4/letter/p/977dab/32.png) [@paula.malec1](https://community.cesium.com/u/paula.malec1)\
**Post date:** [December 5, 2017, 9:11am UTC](https://community.cesium.com/t/esri-shape-vector-to-cesium-map/6322/3 "2017-12-05T09:11:14Z")

</div>

I had the same question when started my project.  
For me, GeoJSON seems as the best solution.  
I used QGIS ( [https://www.qgis.org/en/site/](https://www.qgis.org/en/site/) ) for converting shp to geojson. It's opensource software and easy to convert formats (just Save as...).  
Hope that helps 🙂

---

<div class="post-metadata">

**Author:** ![juhokok25](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@juhokok25](https://community.cesium.com/u/juhokok25)\
**Post date:** [December 11, 2017, 9:22pm UTC](https://community.cesium.com/t/esri-shape-vector-to-cesium-map/6322/4 "2017-12-11T21:22:50Z")

</div>

Hi Paula

Did you find any solution how to get colors in .sld file to GeoJSON in qgis or gdal convertion?

tiistai 5. joulukuuta 2017 11.11.15 UTC+2 [paula....@gmail.com](mailto:paula....@gmail.com) kirjoitti:

---

<div class="post-metadata">

**Author:** ![paula.malec1](https://avatars.discourse-cdn.com/v4/letter/p/977dab/32.png) [@paula.malec1](https://community.cesium.com/u/paula.malec1)\
**Post date:** [December 11, 2017, 10:37pm UTC](https://community.cesium.com/t/esri-shape-vector-to-cesium-map/6322/5 "2017-12-11T22:37:13Z")

</div>

Hi,

unfortunately no, I haven't tried anything with .sld.  
All the coloring was made in the code.  
I assume you need to color your entities differently according to some attribute?  
If so, you can do it in a for loop.  
You may want to make entities while loading GeoJSON.  
I don't know how to explain this well, so you can take a look at this thread where I posted my code [https://groups.google.com/forum/embed/?place=forum/cesium-dev&showsearch=true&showpopout=true&hideforumtitle=true&fragments=true&parenturl=https%3A%2F%2Fcesiumjs.org%2Fforum%2F#!searchin/cesium-dev/paula/cesium-dev/FiF8tbgoPjw/ZXHBhlhABAAJ](https://groups.google.com/forum/embed/?place=forum/cesium-dev&showsearch=true&showpopout=true&hideforumtitle=true&fragments=true&parenturl=https%3A%2F%2Fcesiumjs.org%2Fforum%2F#!searchin/cesium-dev/paula/cesium-dev/FiF8tbgoPjw/ZXHBhlhABAAJ)

---

<div class="post-metadata">

**Author:** ![paula.malec1](https://avatars.discourse-cdn.com/v4/letter/p/977dab/32.png) [@paula.malec1](https://community.cesium.com/u/paula.malec1)\
**Post date:** [December 11, 2017, 10:42pm UTC](https://community.cesium.com/t/esri-shape-vector-to-cesium-map/6322/6 "2017-12-11T22:42:23Z")

</div>

To clarify, I used color hash to store different colors which are assigned to different attribute values (so different color for each attribute value).  
And then: entity.polygon.material = color; this line actually colors the each entity (building or whatsoever) according to a color based on attribute value.
