Hi @greyfox,
If the polygons have a building id on them, the process I would recommend is:
- FaceReplacer to convert the polygons to faces
- Aggregator to group the faces into multi-surfaces. Set group-by to building id.
- If you need Solids instead of multi-surfaces, you can use the SolidBuilder instead of the Aggregator. It can be picky about gaps in your building, though.
- Use the CityGMLGeometrySetter to add the required CityGML role and LOD settings
Thank you for your answer. The Polygons doesn´t have any building id. Every polygon has an oid, but with no information to which building it belongs.
I have to say, that the db is used by a software, where the schema seems to be implemented. in pgadmin i can see over 2.7k tables, but in FME there are only a few. In this software you can select a region by a bbox and export the data. I would like to try this by the FME, but it is possible without knowing the "right" schema?
Thank you for your answer. The Polygons doesn´t have any building id. Every polygon has an oid, but with no information to which building it belongs.
I have to say, that the db is used by a software, where the schema seems to be implemented. in pgadmin i can see over 2.7k tables, but in FME there are only a few. In this software you can select a region by a bbox and export the data. I would like to try this by the FME, but it is possible without knowing the "right" schema?
Hi @greyfox,
Are you using the PostGIS or PostGRES reader to read the database? The PostGRES reader should give you access to more of the non-spatial tables in the database. It's possible that there is a table to map polygon ids to buildings.
If not, I have had some success in the past using the NetworkTopologyCalculator to separate the building polygons:
- GeometryCoercer to convert the polygons to lines
- Chopper to chop lines into 2 point segments
- NetworkTopologyCalculator to figure out which lines connect to each other
- DuplicateRemover to keep only one segment for each polygon id
- FeatureMerger to merge network id on copy of original polygons by polygon id - this becomes the building id
- FaceReplacer and Aggregator as above, grouped by network id.
Hello daveatsafe,
thank you for your answer.
I´ ve found a table with the meanid/meanname, where the building parts like Walls, Roofs, Closure and Ground surfaces have been saved. With the featureJoiner i´ve joined those attributes and could filter the building parts.
Filter:
Unfortunetly I didn´t know which Options I should choose for the CityGMLGeometrySetter
Output:
But unfortunetly there are no gml:id´s
Hello daveatsafe,
thank you for your answer.
I´ ve found a table with the meanid/meanname, where the building parts like Walls, Roofs, Closure and Ground surfaces have been saved. With the featureJoiner i´ve joined those attributes and could filter the building parts.
Filter:
Unfortunetly I didn´t know which Options I should choose for the CityGMLGeometrySetter
Output:
But unfortunetly there are no gml:id´s
The building components (Wall, Roof, Ground) should have their CityGML Lod Name set to lod2MultiSurface and Feature Role set to consistsOfBuildinPart. This will make them children of Buildings.
However, you will also need to create the Building parent features. There should be one for each building, but they require no geometry. Instead of the CityGMLGeometrySetter, use an AttributeCreator to create the attribute citygml_feature_role and set it to cityObjectMember.
You should also create the attribute gml_id on the buildings, either with an AttributeCreator or UUIDGenerator. This gml_id will also need to transferred to the building component features as their gml_parent_id, perhaps with FeatureMergers.
Proper matching of the building gml_ids and component gml_parent_ids will ensure that the feature hierarchy is correct on the output CityGML files.
Hello dave,
should I create the Building features with the Creator? Sorry for those noob questions.
I get the data by a FeatureReader. PostGIS for geometry and PostgreSQL for "non-geometric" data, because I cant see them in the Reader using the PostGIS reader.
After this I pass all the geometries to a UUIDGenerator and filter them (Ground,Closure,Roof and Wall)
My problem here is first to understand how all those loose parts can be assigned to a building without other informations.
Hello dave,
should I create the Building features with the Creator? Sorry for those noob questions.
I get the data by a FeatureReader. PostGIS for geometry and PostgreSQL for "non-geometric" data, because I cant see them in the Reader using the PostGIS reader.
After this I pass all the geometries to a UUIDGenerator and filter them (Ground,Closure,Roof and Wall)
My problem here is first to understand how all those loose parts can be assigned to a building without other informations.
It would be very helpful to see the features you are working with. You can create a template from the workspace that includes the feature caches using the following process:
- Open and run the workspace to populate the feature caches
- File - Save as Template
- Check the Files to Add - Include Feature Caches box
- Click OK to save
If you do not want to share the template publicly, you can email it directly to me: dave.campanas@safe.com. I will be able to open the template and see the features at each step.