Closed enersis-pst closed 3 years ago
This tool needs a triangulated PolyhedralSurfaceZ as input.
There are several ways to generate these geometries. In FME you can use Triangulator (see https://github.com/Geodan/pg2b3dm/blob/master/dataprocessing/dataprocessing_citygml.md). In PostGIS you can use functions like ST_DelaunayTriangle to generate the triangulated PolyhedralSurfaceZ.
@bertt thanks, may i can ask a further question,... what are the differents between the format for cesium and mapbox? there is a -f property for bertt/tesselate_building
yes, in that tool the input data is 4326. The tool converts to 3857 in case of -f mapbox and to 4978 in case of -f cesium.
pg2b3dm does not do this, so the input data must be already in correct format for the used client.
For me ST_DelaunayTriangle
doesnt work for walls. Here it returns empty. Looks like triangulate only works for xy. But ST_Tesselate
did the job.
Im only a bit afraid of the orientation of the vertex of the polygons. For now it looks like that cityGml have the right orientation, but not shure.
ok good to know ST_Tesselate works better. About the orientations: it shouldn't give a problem in glTF's (because material is double sided). Only thing to watch out for is innerpolygons in the cityGML.
Hey, if i search for postgres triangulation, i find different functions like ST_DelaunayTriangles, ST_ConstrainedDelaunayTriangles, ST_Tesselate. Does someone know if this could also be used instead of the triangulation function of FME? Or why this was used?