Skip to main content
Question

SurfaceFootprintReplacer and Polygons with holes


Forum|alt.badge.img

Hi everyone,

I wonder if there is any way to force the SurfaceFootprintReplacer to not ignore holes in polygons?

I have 3D cityGML data and want to get only the footprint, using the SurfaceFootprintReplacer the result is image Nr.2, all holes are gone and merged to one polygon.

There is a custom converter called "GroundSurfaceExtractor" (I found somewhere in the web), what does it correct but this one takes around 10 times longer to calculate.

Any hints?

(btw: the cityGML does not include "ground_surface" elements to query for, I tried this one...)

Thanks a lot!

Building Polygon in 2D:

SurfaceFootprintReplacer Result:

7 replies

takashi
Evangelist
  • June 16, 2016

Hi @twain, unfortunately the SurfaceFootprintReplacer won't create holes anyway. The help doc says "Any holes in the actual shadows are missing in the output features".

This procedure may be a workaround, but I don't know if it's more efficient...

  1. 2DForcer
  2. Chopper (Mode: By Vertex, Maximum Vertices: 2)
  3. AreaBuilder (Group By: <feature ID attribute>, Create Donuts, Drop Holes: Yes)

takashi
Evangelist
  • June 17, 2016
takashi wrote:

Hi @twain, unfortunately the SurfaceFootprintReplacer won't create holes anyway. The help doc says "Any holes in the actual shadows are missing in the output features".

This procedure may be a workaround, but I don't know if it's more efficient...

  1. 2DForcer
  2. Chopper (Mode: By Vertex, Maximum Vertices: 2)
  3. AreaBuilder (Group By: <feature ID attribute>, Create Donuts, Drop Holes: Yes)

This might be a more generic way.

  1. GeometryCoercer (Geometry Type: fme_composite_surface): Transform solid into composite surface.
  2. Deaggregator (Split Composite: Yes): Decompose the composite surface into individual simple surfaces.
  3. 2DForcer: Transform the surfaces into 2D geometries.
  4. GeometryFilter: Keep area features only (since the 2DForcer transforms vertical wall surfaces into lines).
  5. Dissolver: Dissolve the areas for each set of features from the same original solid.

Forum|alt.badge.img
  • Author
  • June 17, 2016

Hi @takashi,

thanks a lot for your comments!

I just testet the first idea, so far it works perfect The first results are looking good, the calculated area (sum) and volume are identical to the "old" way. And 10 times faster.

What might be the advantage for way 2?


takashi
Evangelist
  • June 17, 2016
twain wrote:

Hi @takashi,

thanks a lot for your comments!

I just testet the first idea, so far it works perfect The first results are looking good, the calculated area (sum) and volume are identical to the "old" way. And 10 times faster.

What might be the advantage for way 2?

Good to hear.

The 1st way can be applied only when all walls are precisely vertical. If a wall is sloped or bulged (including a case where there is a a slight error in x and/or y direction between bottom edge and top edge of the same wall), the AreaBuilder may not create correct footprint.

The 2nd way can be applied to the case where the walls are sloped. It's the advantage.

I expect that the 1st way can be applied to most of CityGML dataset, but consider using the 2nd way if you find a sloping or bulging wall.


Forum|alt.badge.img
  • Author
  • June 17, 2016

@takashi - thx for the explanation. Makes sense. Currently the dataset it just lod1 building models, simple model. the walls should all be vertical. But I will implement the second way to the workspace and later test if there is any difference in the calculation.

best regard!


takashi
Evangelist
  • June 18, 2016
twain wrote:

@takashi - thx for the explanation. Makes sense. Currently the dataset it just lod1 building models, simple model. the walls should all be vertical. But I will implement the second way to the workspace and later test if there is any difference in the calculation.

best regard!

Found a simpler way.

  1. 2DForcer: Transform a solid into 2D geometry (an aggregate consisting of areas and lines).
  2. Deaggregator (Mode: Flatten All Levels): Decompose the aggregate into individual geometries.
  3. GeometryFilter: Keep area features.
  4. Dissover: Dissolve the areas for each set of features from the same original solid.

Note: The 2DForcer transforms a solid into an aggregate consisting of areas and lines, and the Dissolver performs de-aggregation automatically if the input feature has an aggregate. Therefore the Deaggregator and GeometryFilter may be omitted.


jackfanzhang
Contributor
Forum|alt.badge.img+2
  • Contributor
  • October 28, 2021
takashi wrote:

Hi @twain, unfortunately the SurfaceFootprintReplacer won't create holes anyway. The help doc says "Any holes in the actual shadows are missing in the output features".

This procedure may be a workaround, but I don't know if it's more efficient...

  1. 2DForcer
  2. Chopper (Mode: By Vertex, Maximum Vertices: 2)
  3. AreaBuilder (Group By: <feature ID attribute>, Create Donuts, Drop Holes: Yes)

Thanks Taskashi I wasn't aware that in SurfaceFootprintReplacer holes in the actual shadows are missing in the output features.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings