OSMBuilding has a function which allows 3D json file be added to Leaflet as stated here. The question is how I can get the same format from GeoServer.
I have tried this
http://localhost:9090/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=localhost%3A3D_sample&outputFormat=json&dataType=jsonp
as stated here and here, I could get a Json output like this:
{"type":"FeatureCollection","totalFeatures":1,"features":[{"type":"Feature","id":"3D_sample.fid--57e9f8c8_15eeea74f64_-11f9","geometry":{"type":"MultiLineString","coordinates":[[[174.88757026,-36.90768287,24.4688],[174.88754738,-36.90774106,22.4855]],[[174.88754738,-36.90774106,22.4855],......]]},"geometry_name":"geom","properties":{"objectid":1,"recordstatus":"Current","heightminlidar":0.855906,"heightmaxlidar":6.61621999,"heightmeanlidar":4.5......,174.88764272,-36.90753397]}}],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4167"}},"bbox":[174.88743904,-36.90774106,174.88764272,-36.90753397]}
While I need sth like this as stated here
{
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[174.749268, -36.853149],
[174.751368, -36.854249],
[174.752468 ,-36.855349],
[174.753568 ,-36.856449 ],
[174.749268, -36.853149]
]
]
},
"properties": {
"color": "rgb(255,200,150)",
"height": 220
}
}]}
this means I do not need this
{"type":"FeatureCollection","totalFeatures":1,"features":[{"type":"Feature","id":"3D_sample.fid--57e9f8c8_15eeea74f64_-1205","geometry":
from Geoserver, but I do not know how I could get the right format.