Problem:
I'm having trouble converting 3D Sketchup building data to a more simplified PostGIS 3D Polygon (ST_Polygon or ST_MultiPolygon). The SketchUp buildings data are not represented as 3D volume representations but made of series of parts representing the building which need to be recreated to polygon objects and output to POSTGIS DB.
Aim:
We need to reconstitute the building parts to solid polygon 3D representation losing the separate SketchUp parts of faces, edges and, vertices. Our aim is to simplify the building to show the outer most extent (removing detail/vertices within the building).
The Process:
We're using the GeometryPartExtractor to get the SketchUp data into a usable format and geometry coercer to fme_polygon. The complexity of the vertices and ordering of them has meant we get some unwanted results when re-constituting the geometry after partextraction and using PostGIS geometry conversion or geometry fix commands (ST_MakeValid).
Â
Â
The FME Inspector seems to render the buildings OK but when I output to PostGIS it comes through as 'ST_PolyhedralSurface' but we need to convert the geometry to Polygon in PostGIS for proper feature representation and count of buildings. This is where geometry types conversions becomes a challenge because PolyhedralSurfaces have duplicate vertices and improper ordering of the parts creates problems in geometry type to geometry type conversions.
Therefore, after writing to PostGIS I added a python caller and executed a postgres query ST_Multi(ST_Collectionextract(geom,3)) which created some polygons.
If we use the Aggregator by sketchup_entity_id and write to PostGIS it will create ST_MultiPolygon which is incredible slow to load. If we don't aggregate it creates ST_Polygon and loads the individual faces.
Any ideas?