Question

Clipping 3D City model by polygon

  • 24 April 2019
  • 7 replies
  • 19 views

Badge

I have 3D building model (in *.ffs and cityGML format) and I would like to clip of them by 2D polygon. I tried Clipper transformer, Extruder 2D polygon and SpatialRelator ("Requestor is Within Supplier"), and I tried also a CSGBuilder. But all of them don't give me appropriate result.

When I use a spatial relator, my result is in Rejected port, and Total Features Written is 0.

When I use a Clipper Transformer, I receive an error: "Clipping is not supported for IFMEBRepSolid geometry"

Someone has any idea to solution of my problem?

Thanks in advance.


7 replies

Badge +11

Hi @borko_k,

 

FME is not able to perform clipping operations on meshes. When you load CityGML data into FME, your solid or thematic surfaces (depends on how your CityGML is composed) are imported as such a data type.

To be able to clip the geometry you'll have to force polygon geometry type. This can be done by Deaggregator and GeometryCoercer transformer. Enable option "Split Composites" and route deaggregated features through GeometryCoercer with GeometryType set to "fme_polygon". If your input data is read as geometry type "IFMEMesh" you'lll have to use another GeometryCoercer before deaggregator runs, with GeometryType set to "fme_composite_surface".

Be aware that coercing surface geometry to polygons will eliminate all appearance information! You'll lose every kind of texture by this method! After clipping it's also very likely that you'll have to adjust sematic structure of your CityGML, assuming that the clipping should lead to new Buildings oder BuildingParts. The writer can't do the trick for you, it's up to the workspace author to model the data structure correctly.

Badge

Hi @borko_k,

 

FME is not able to perform clipping operations on meshes. When you load CityGML data into FME, your solid or thematic surfaces (depends on how your CityGML is composed) are imported as such a data type.

To be able to clip the geometry you'll have to force polygon geometry type. This can be done by Deaggregator and GeometryCoercer transformer. Enable option "Split Composites" and route deaggregated features through GeometryCoercer with GeometryType set to "fme_polygon". If your input data is read as geometry type "IFMEMesh" you'lll have to use another GeometryCoercer before deaggregator runs, with GeometryType set to "fme_composite_surface".

Be aware that coercing surface geometry to polygons will eliminate all appearance information! You'll lose every kind of texture by this method! After clipping it's also very likely that you'll have to adjust sematic structure of your CityGML, assuming that the clipping should lead to new Buildings oder BuildingParts. The writer can't do the trick for you, it's up to the workspace author to model the data structure correctly.

Thanks for your advance.

In my company, we find a different way to solution to my problem - with using a 2DForcer and FeatureMerger with oryginal data. In this way, Clipper transformer is sufficient.

Thanks for your advance.

In my company, we find a different way to solution to my problem - with using a 2DForcer and FeatureMerger with oryginal data. In this way, Clipper transformer is sufficient.

Hello @borko_k, Could u provide image of ur workflow using mentioned above or explain it further? I am struggling with figuring it out.

Badge +7

Hello @borko_k, Could u provide image of ur workflow using mentioned above or explain it further? I am struggling with figuring it out.

Seconded!

 

Please reup the screen (better up the whole Workspace, if you don't mind)
Userlevel 2
Badge +17

You can clip solids by another solid in the Clipper, so you could try extruding your clipping polygons with an Extruder transformer. However, solid clipping is quite slow. Alternatively, you could coerce the solids to composite surfaces using a GeometryCoercer, then clip with the FME Hub SurfaceClipper transformer, which will keep all texturing intact.

FMEHello,

I encountered the same challenge and solved it using the "clip to search envelope" parameters straight in the import CityGML file in FME. Worked like a charm for me !

Badge +7

FMEHello,

I encountered the same challenge and solved it using the "clip to search envelope" parameters straight in the import CityGML file in FME. Worked like a charm for me !

Hey Frank, good to know!

Problem is clipping by polygon (e.g. a city surrounding) which usually isn't perfectly squared 😄

Reply