Skip to main content

Hello,

I have a shapefile representing a neighborhood of a city. It contains 455 shapes with one shape per building. Each shape contains multipolygons corresponding to the building walls or little facade elements. Some buildings have common walls but their 3D points are not equal (typically 10 cm distance between them).

I would like to group the neighboring buildings and extract their hulls. In other terms, I would like to only keep the multipolygons that constitute the contours of the building blocks.

I am a beginner with FME and I have tried many transformes (geometry extractor, bufferer, dissolver, deaggregator, aggregator, hullreplacer) but I could not get what I want.

If you have any advice, that would be great!

Thank you!

Based on what your data looks like, I think Snapper and then Dissolver could work. Snapping would remove the gaps and then the Dissolver removes the common walls. Depending on your snapping tolerance the outside shape of the building block is not altered too much (whereas potentially the HullReplacer would introduce larger differences)


Do you have sample data? It should not be so difficult for what I read but need to see your data to fully understand? If you could send your workspace as a template ( you may need to change the source data to something smaller) I can look into it.


Thanks for the answers. I extracted a small part of the source data and I have saved my workspace as a template (see attached document).

 

I found a partial solution to my problem (Reader -> GeometryExtractor -> SurfaceFootPrintReplacer -> Dissolver -> ListConcatenator -> Writer). This provides me the building contours in 2D but ideally, I would like to retrieve the 3D model again. To do this, my idea is to compare the (x, y) coordinates of the input and the output. If they match, I keep the (x,y,z) coordinates of the input, otherwise I filter them out.

 

Is it possible to do this in FME? Otherswise I would export the output as shapefile and do it in Python.

 

 


Thanks for the answers. I extracted a small part of the source data and I have saved my workspace as a template (see attached document).

 

I found a partial solution to my problem (Reader -> GeometryExtractor -> SurfaceFootPrintReplacer -> Dissolver -> ListConcatenator -> Writer). This provides me the building contours in 2D but ideally, I would like to retrieve the 3D model again. To do this, my idea is to compare the (x, y) coordinates of the input and the output. If they match, I keep the (x,y,z) coordinates of the input, otherwise I filter them out.

 

Is it possible to do this in FME? Otherswise I would export the output as shapefile and do it in Python.

 

 

Hello again. I think I understood you. Please tell me if I missed something. Maybe this is a partial solution?

What I did is that I created a hull for close buildings. And then dissolved them and created an id for each group. Then with a spatial relation you can add those id to each overlapping objects and after that do what you want with the ID. Select building by attribute for example. Or maybe aggregate them.

 


Hello again. I think I understood you. Please tell me if I missed something. Maybe this is a partial solution?

What I did is that I created a hull for close buildings. And then dissolved them and created an id for each group. Then with a spatial relation you can add those id to each overlapping objects and after that do what you want with the ID. Select building by attribute for example. Or maybe aggregate them.

 

Hi! Thanks a lot for your answer.

 

The second option looks interesting. Though, instead of having the convex hull of the HullReplacer, I would like to have the exact footprint of the exterior walls. Indeed, if you see the 4 buildings on the left, you can notice that the exterior walls are not straight but have multiple convex or concave U-shapes.

 

In other words, from my input which is IFMEMultiAreas containing IFMEPolygons, I would like to get as output the same IFMEMultiAreas without the interior IFME Polygons (representing small parts in the middle of buildings + common walls between buildings).

 


Hello again. I think I understood you. Please tell me if I missed something. Maybe this is a partial solution?

What I did is that I created a hull for close buildings. And then dissolved them and created an id for each group. Then with a spatial relation you can add those id to each overlapping objects and after that do what you want with the ID. Select building by attribute for example. Or maybe aggregate them.

 

Hello, oh, yes I see that now. I can check it further during the day.


Hello again. I think I understood you. Please tell me if I missed something. Maybe this is a partial solution?

What I did is that I created a hull for close buildings. And then dissolved them and created an id for each group. Then with a spatial relation you can add those id to each overlapping objects and after that do what you want with the ID. Select building by attribute for example. Or maybe aggregate them.

 

maybe like this?

You suggestion with Footprint works fine but I just had do de-aggregate the objects and force to lines.


Hello again. I think I understood you. Please tell me if I missed something. Maybe this is a partial solution?

What I did is that I created a hull for close buildings. And then dissolved them and created an id for each group. Then with a spatial relation you can add those id to each overlapping objects and after that do what you want with the ID. Select building by attribute for example. Or maybe aggregate them.

 

Thanks for the new solution. It is better than the HullReplacer but it is still not what I would like to achieve.

 

Indeed, you get as output one IFMEPolygon (or IFMEDonut) per group of buildings. However, I would like to have the original IFMEMultiAreas containing multiple IFMEPolygons. I need them for further processing because I have texture images corresponding to the IFMEPolygons.


Hello again. I think I understood you. Please tell me if I missed something. Maybe this is a partial solution?

What I did is that I created a hull for close buildings. And then dissolved them and created an id for each group. Then with a spatial relation you can add those id to each overlapping objects and after that do what you want with the ID. Select building by attribute for example. Or maybe aggregate them.

 

Hello, Sorry for late answer. Apologize for not understood. So if you need the original donuts but need the grouped footprints. Is this a solutiob for you?

For every original donuts you get the overlapping footprint ID per building group.

 

image


Thanks for the answers. I extracted a small part of the source data and I have saved my workspace as a template (see attached document).

 

I found a partial solution to my problem (Reader -> GeometryExtractor -> SurfaceFootPrintReplacer -> Dissolver -> ListConcatenator -> Writer). This provides me the building contours in 2D but ideally, I would like to retrieve the 3D model again. To do this, my idea is to compare the (x, y) coordinates of the input and the output. If they match, I keep the (x,y,z) coordinates of the input, otherwise I filter them out.

 

Is it possible to do this in FME? Otherswise I would export the output as shapefile and do it in Python.

 

 

Hello,

Sorry for the late reply and thank you very much for your answer.

In the end, I took the building footprint provided by FME to create the hull and I exported it as a shapfile. Then I processed both shapefiles with Python to extract exactly the shapes / parts I want to keep. Now everything is all right.

Thanks again!


Reply