Skip to main content

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?

I'm not sure if this is what you're after, however, one method for simplifying buildings could be to use the SurfaceFootprintReplacer to get the 2D footprint of the building, dissolve the result grouping by building ID and then extrude the resulting polygon to the max height of the building. This would give you a simple Solid LOD1 block model. If you then needed polygons you could either use the part extractor, or coerce to CompositeSurface, Deaggregate, and then coerce to polygons.

This method should give you fairly clean geometries as long as the building footprint is ok.

You won't be able to preserve the roof structure though which is a big downside of this method.

Hopefully this helps


I'm not sure if this is what you're after, however, one method for simplifying buildings could be to use the SurfaceFootprintReplacer to get the 2D footprint of the building, dissolve the result grouping by building ID and then extrude the resulting polygon to the max height of the building. This would give you a simple Solid LOD1 block model. If you then needed polygons you could either use the part extractor, or coerce to CompositeSurface, Deaggregate, and then coerce to polygons.

This method should give you fairly clean geometries as long as the building footprint is ok.

You won't be able to preserve the roof structure though which is a big downside of this method.

Hopefully this helps

Hi, thanks but I've already tried that as possibility with some success but we don't want to lose the detail of the building shape and roof. Hopefully there's a solution out there that can keep the complexity of the exterior of the building.


Reply