ESRI shape vector to Cesium map

524 views
Skip to first unread message

juho...@gmail.com

unread,
Dec 4, 2017, 2:33:12 AM12/4/17
to cesium-dev
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!

Sean Lilley

unread,
Dec 4, 2017, 7:51:03 PM12/4/17
to cesium-dev
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.

paula....@gmail.com

unread,
Dec 5, 2017, 4:11:15 AM12/5/17
to cesium-dev
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/ ) for converting shp to geojson. It's opensource software and easy to convert formats (just Save as...).
Hope that helps :)

juho...@gmail.com

unread,
Dec 11, 2017, 4:22:50 PM12/11/17
to cesium-dev
Hi Paula

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

paula....@gmail.com

unread,
Dec 11, 2017, 5:37:13 PM12/11/17
to cesium-dev
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

paula....@gmail.com

unread,
Dec 11, 2017, 5:42:23 PM12/11/17
to cesium-dev
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.
Reply all
Reply to author
Forward
0 new messages