Polygon with height data to 3D

Hi guys, I am a bit of a beginner for cesium, 3D, GIS etc.

I am interested is there a possible way or a tool to convert geo multipolygon data from PostGIS (with heights) to glTF or some format that is convertable to glTF?

I am talking about buildings data, so I want to create basic 3D models by extruding those polygons.

I can select geojson from postgis or similar..

Any help is welcome!



There are a few possible solutions here. Cesium has support for geojson directly, so depending on the complexity, you may be able to simply load in the generated geojson file. Here is an example for how to add it to Cesium: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=GeoJSON%20and%20TopoJSON.html&label=DataSources

You could also take the data and have code that creates extruded polygons for each entry. Here is an example for adding polygons: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Polygon.html&label=Geometries

However, it sounds like with building data, your situation may be a little more complicated and you most likely want to use the 3D Tiles format. You can read more about this here: https://groups.google.com/d/msg/cesium-dev/tCCooBxpZFU/7hxT_E4pGgAJ

For that, I think glTF is the way to go. Sorry, I don’t know of any tools to convert PostGIS data to glTF. If you can convert it to collada models, you can use the open source collada2gltf converter.



Thx for the fast response!

Initialy I did used geojson with cesium extrusion..

But I have 500k buildings, so I have performance problems..

I would work with 3D tiles if I can somehow generate models..

Buildings are just polygons made from points which are longitude and latitude.
I have byilding heights also.

So I would like to stream glTF with czml or to use 3D tiles.

So any idea on how to create glTF from the data I have will be more than helpful!


If its possible to make this kind of basic conversion I would gladly open a github repo and code an npm package

Yes I have the same use case! I think that Cesium is working on a vector tileset specification which will provide 3D streaming to massive vector datasets in geojson format. I have a 900K plus building set that would be great for the vector tileset.

I am open to tinkering with the b3dm specification for streaming gltf models, but I am having a hard time converting my geojson data into collada .dae format which can then be converted to gltf. From what I understand, until cesium releases a conversion tool for generating b3dm files, we will have write our own tool that can convert many collada models into one gltf and assigning building ids to each of the vertices for each of the buildings converted into gltf. My issue has been preserving the geographical coordinates in my conversion from geojson to collada. If anybody knows of a way to do this, I would be very grateful for this knowledge!



More better would be to convert geoJSON directly go glTF.. so no collada converting.. I started to study glTF spec to try to do it..
But It requires a large amount of time.. it also requires webGL knowledge.
Than I started to learn webGL so I can better understand how glTF is composed. I had some success but all this requires large amount of time which unfortunately I don't have

Waiting for 3d-tiles vector stream also..