OLcesium 3D Buildings
Hello,
I want to make buildings in 3D. Right now i want the buildings like a shoe box (floor, roof and walls) I have the data from the heights of all the buildings in the Netherlands and i have the coordinates for every building for the Netherlands. I work with Angular/Typescript, Openlayers and the datasets from pdok and the TU delft. I think that (OL)cesium is the think i should work with, (I don't know)
pandSource = new VectorSource({ format: new GeoJSON(), url: (extent, resolution, projection) => { return 'https://cors-anywhere.herokuapp.com/http://godzilla.bk.tudelft.nl:8090/geoserver/BAG3D/wfs?service=WFS&' + 'version=1.0.0&request=GetFeature&typeName=pand3d&' + 'outputFormat=json&srsname=EPSG:28992&' + 'bbox=' + extent.join(',') + ',EPSG:28992'; }, strategy: bbox });
pand3DLayer = new VectorLayer({ minResolution: 0, maxResolution: 0.7, source: this.pandSource, zIndex: 4, });
These are my vectorlayer and vectorsource. Can someone help me to create 3D Buildings for the Netherlands?
https://www.3dbag.nl/en/download
Hi, i have the same question,have you got the solution? @DeManHemZelfe
Hi @DeManHemZelfe , @jacmendt , at the moment there is no support for extrusion on OL-Cesium. There was some discussion about it some time ago, see https://github.com/openlayers/ol-cesium/issues/167#issuecomment-74267653.
Basically, you need to:
- update the
olPolygonGeometryToCesiumto read an extrusion property from the feature and set theextrudedHeightattribute to the Cesium geometry; - set this extrusion property on each ol Feature (this should be done preferabily before insertion to the OL source so that the OL-Cesium converter can run on the feature with extrusion). Since there is no standard for such a property, I would suggest
olcs_extruded_height.
Pull request welcomed for this feature. Also add 1 such feature to the vector feature example.