Select to view content in your preferred language

MeshMerger Transformer

3114
3
03-04-2013 01:24 AM
LechKar_owicz
Deactivated User
Hello,
I'm in a situation where I have a source MultiPatch feature class (3d models of a city) in which every wall is represented as a different feature (object). I'm trying to make something usefull out of it, ie. aggregate features into buildings or 'buildings fitting in a square grid'. I've tried 'ordinary' ArcGIS tools for merging 3D features, but with no acceptable results. 'Multipatch to collada' tool generates a single collada file for every object in the source multipatch which means thousands distinct collada files, everyone with one triangle in it. If I want to Union 3D the source multipatch, I have to enclose it first. But enclosing (Enclose Multipatch) the source multipatch gives all kinds of strange effects - missing walls, some polygons connected, that should not be connected etc. (I guess it's because of quite a high detail of the source models).
So I've tried to switch to Data Interoperability extension. What I managed to do here is to aggregate (Aggregate Transformer) all the features in the multipatch into one feature (potentially I guess I can merge source multipatch features into separate features based on their belonging to a square grid, or some different suitable criteria). Unfortunately it does not 'clean up' the mesh, so I get a 'polygon soup' which exported to KML (my target format)/Collada gives me a collada file with one object in it, which is composed of thousands of sub-objects - the original features (walls). I could open it in a 3rd party 3D editing application to clean it up, but if the file is too big or has too rich structure (hundreds of thousands of the sub-objects) and it freezes all the applications I've tried.
The interesting transformer which according to documentation does what I want to do - MeshMerger - seems to do nothing for me. I've tried several different inputs and it always writes 0 features out of x features read. When I insert inspector point before the MeshMerger I can see all the 3D city in the Viewer, but I can't merge it and output to any format (obj, multipatch, kml, collada).
The only workarounds I've found are:
- manual one - importing the source multipatch (the one with thousands of objects) into CityEngine, manually merging it from there and exporting as kml/multipatch
- aggregating the multipatch into single feature in Data Interoperability and writing it to obj format, which gives me a single, reasonably sized object which can be edited in 3D editing software for removing duplicated vertices etc.

Any help that gives more explanation in the matter of MeshMerger transformer than the rather superficial documentation: http://docs.safe.com/fme/html/FME_Transformers/FMETransformers.htm#Transformers/meshmerger.htm wold be appreciated.

Best regards,
Lech
0 Kudos
3 Replies
SeanGrant
Frequent Contributor
Do your building walls have an identifier that goes to the building? For example, there are four walls that are a part of building 1 and each wall has an attribute called "buid_num" which is unique. If so you can try the Aggregator again but specify the gruop by parameters to that unique id (build_num).

-Sean
0 Kudos
LechKar_owicz
Deactivated User
Well, if it were that easy... 😉 Unfortunately I don't have any such attribute, and the data I have is in 'as is' state. So the only reasonable way of aggregating the data is a spatial one I think. One way I tried was to assign such an 'building-id' attribute to the walls by spatial joining it to building footprints, but that also failed. The problem here is that you can't use multipatch in spatial join, you have to make a footprint feature class out of it. But when doing so, totally vertical walls are 'footprinted' into their 2D 'envelope', so their footprints-envelopes often intersect two or three building footprints from the other feature class. BTW vertical walls seem to cause troubles in eg. spliting the multipatches into square grid in DI.

I also thought of making polygons, which boundaries wold be roads' center lines (so in theory all the buildings should lay inside one and only one such a polygon) and aggregating them based on that. That might be some kind of solution, but still it does not solve the troubles with MeshMerger, I described.
0 Kudos
SeanGrant
Frequent Contributor
I havent worked too much with multi-patch or 3D features in DI/FME so maybe try and post your question on the FME forum here .

-Sean
0 Kudos