ol-cesium icon indicating copy to clipboard operation
ol-cesium copied to clipboard

OLcesium 3D Buildings

Open DeManHemZelfe opened this issue 5 years ago • 3 comments

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?

DeManHemZelfe avatar Mar 05 '20 08:03 DeManHemZelfe

https://www.3dbag.nl/en/download

janvanbennekom avatar Jun 24 '21 17:06 janvanbennekom

Hi, i have the same question,have you got the solution? @DeManHemZelfe

JungleHH avatar Sep 01 '21 02:09 JungleHH

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 olPolygonGeometryToCesium to read an extrusion property from the feature and set the extrudedHeight attribute 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.

gberaudo avatar Sep 02 '21 07:09 gberaudo