Skip to main content
Question

DonutBuilder: Two Polygons on different heights, incorrect donut – random heights assignment


Forum|alt.badge.img

I am writing a CityGML file by reading the LOD2 3D building models from the DGN file.

While reading the DGN, grouped holes are exploded, i.e. “Expand Unnamed (Group Hole) Cells: Yes” and then DonutBuilder is used to re-build the required geometry, i.e. grouped holes.

However, rebuilding the grouped holes with the DonutBuilder for the polygons at different heights does not work properly and seems to randomly assign the Z from either the top or bottom or some from bottom and some from top.

Please see screen grabs below showing building superstructures:

The part that re-builds polygon cutouts is as follows: I used the Group By: “igds_cell_name_sequence_number” from the original DGN grouped hole cells that got expanded when read in order to rebuild them again with DonutBuilder. I tried different Z Modes but it did not help to prevent from incorrect group hole building It seems to be random, in some cases it will built a correct geometry, in other, it will do the incorrect “unexpected” geometry.

Your help much appreciated!

Many thanks,

Magda

6 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • December 7, 2017

Hi, how about this procedure?

  1. Save the original z-coordinate as an attribute (ElevationExtractor)
  2. Convert the 3D polygons to 2D polygons (2DForcer).
  3. Build donut (DonutBuilder).
  4. Restore z-coordinate from the attribute (3DForcer)

Forum|alt.badge.img
  • Author
  • December 7, 2017

Hi Takashi,

Many thanks for your response.

This procedure may work for flat roofs, i.e. all vertices have the same Z.

I will have buildings with different roof types, for example, gabled roof that will have a dormer window.

Therefore, I tried to do the following logic, thinking that order of inputs matters, i.e. bottom/lowest polygon first. That created the superstructure and main roof plane at correct heights, but did not create any hole in the lowest polygon. Probably as I added the "z" coordinate to the Group_By in the DonutBuilder and z is unique?

1. Extract z-coordinates (CoordinateExtractor)

2. Sort the z-coordinates : Numeric and Ascending in order to put polygons with lower heights first (Sorter)

3. Create a Donut using the Group_By with both "igds_cell_name_sequence_number" and "z"

Probably here, because z is unique, the hole is not created...

What I am trying to do is in the Group_By - it should recognize the order of input.

Your suggestions much appreciated!

Many thanks,

Magda


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • December 7, 2017

In similar cases, I frequently use the SurfaceDraper to restore the original z-coordinates.


Forum|alt.badge.img
  • Author
  • December 7, 2017

Hi Takashi,

Thank you.I would much appreciate your further help.

Please see the example DGN and workspace I have at the moment. I was not sure how I could implement your solution to it or change the workspace to create the desired result.

building-examples2.dgn

example-fme.fmw

Many thanks,

Magda


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • December 7, 2017
wilczekmj wrote:

Hi Takashi,

Thank you.I would much appreciate your further help.

Please see the example DGN and workspace I have at the moment. I was not sure how I could implement your solution to it or change the workspace to create the desired result.

building-examples2.dgn

example-fme.fmw

Many thanks,

Magda

I still think the SurfaceDraper would be helpful. See this example.

 

create-donuts-in-3d-example.fmwt (FME 2017.1.1.1)

 


Forum|alt.badge.img
  • Author
  • March 29, 2018
takashi wrote:

Hi, how about this procedure?

  1. Save the original z-coordinate as an attribute (ElevationExtractor)
  2. Convert the 3D polygons to 2D polygons (2DForcer).
  3. Build donut (DonutBuilder).
  4. Restore z-coordinate from the attribute (3DForcer)
Hi Takashi,

 

 

3DForcer assigns one same height to all vertices. It is not the case in my data where vertices have different heights.

 

I also tried the SurfaceDraper, but it interpolates the heights and assign new, slightly different heights and I need to assign identical heights as the input data due to strict Planarity requirements.

 

 

What would really work for me, would be to find co-planar polygons, i.e. lying on the same surface within the provided tolerance, and only use these in DonutBuilder.

 

 

Do you have any suggestions to how one could find co-planar polygons in FME?

 

 

Many thanks

 

 


Reply


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