Hi,
Â
Â
Well this is an interesting question. Here are some hints:
Â
Â
1. Read DEM points with Space Delimited XYZ Reader or ESRI ASCII Grid Reader might work too.
Â
Â
2. Read the buildings in with CityGML Reader.
Â
Â
3. Use GeometryExtractor for the buildings to save their geometry temporarily.
Â
Â
4. Use 2DForcer for the buildings after GeometryExtractor.
Â
Â
5. Use ElevationExtractor for the DEM points.
Â
Â
6. Use PointOnAreaOverlayer to combine points and 2D buildings.
Â
Â
7. Now you can use ListRangeExtractor to get max/min elevation or a combination of ListElementCounter, ListSummer and ExpressionEvaluator to get e.g. mean elevation.
Â
Â
8. Finally use GeometryReplacer to get the original building geometry.
Â
Â
Notice that after phase 4 you might need to use Dissolver or BoundingBoxAccumulator to simplify the geometry.
Â
Â
Hope this helps!
Hey Geolassi,
Â
Â
big thanks for your interesting ideas on this subject.
Â
In the end I used a different way to get to an acceptable solution via the SurfaceDraper-Transformer.
Â
I could feed this one with my DEM-point-file, the breaklines and and a drape-feature.
Â
As the drape-feature I used my 2D-búilding-outlines. The output presented me with an interpolated height value for each node (vertex) of my building outlines.
Â
I just picked the lowest height as the base height for the building.
Â
Â
Patrick
Hi, I saw this question and since I had a similar problem, I wanted to share my successful approach here, using FME 2013.
Â
Â
A CityGML was fitting precisely to a certain Digital Elevation Model. Now we wanted to use a different DEM as the base, and of course the GroundSurfaces and WallSurfaces were zigzagging above and below the new ground.
Â
My task was to make it fit to the new DEM without altering the roofs.
Â
Â
To that end, I did the following:
Â
1) take the TINGenerator and create the DEM (in the exact way that the new DEM was created of course). I took the triangles from the output.
Â
2) read the old CityGML (I only needed the roofs) and deaggregate them, so that we have surface triangles
Â
3) optional] with 2DForcer, AreaOnAreaOverlayer and AttributeFilters, sort out all TIN triangles that don't overlap with a roof - those are not needed. With a Counter before and FeatureMerger afterwards, filter them from the original data. I'm omitting the details here.
Â
4) extrude the TIN triangles on the Z axis by -1500 meters
Â
5) extrude the roof surface on the Z axis by -1000 meters
Â
6) Clip them (TIN as clipper, roofs as clippee). Depending on how large the data, this is process is quite long and inefficient, and you may need step 3) to reduce the dataload.
Â
Take the "outside" output; with a GeometryCoercer you can convert the solids in surfaces again, then Deaggregate them.
Â
7) take the Matcher and match the output of step 2) against the output of step 6). This gives you the roofs.
Â
8) take the rest and filter out the walls (my approach was a chain of Counter, 2dForcer, AreaCalculator, FeatureMerger, then filter out all features with an "area" of almost null). This separates the walls from the ground surfaces.
Â
9) take the roofs, walls and grounds and recreate the CityGML. Hint:
http://fmepedia.safe.com/articles/How_To/Writing-CityGML-ExampleÂ
Â
For the OP, this process also gives you the lowest points of each building. I know you solved your problem already, I just wanted to point out another way for others who want to "intersect DEM and CityGML".
Â
Â
I had searched a bit on the net, and found a related topic here: https://groups.google.com/forum/?fromgroups=#!topic/fmetalk/VJwiLCmKyyE
hello, maybe you will help me with my question..
Â
I have shp file with attribute of height and I want to receive citygml file where walls and roofs are separated
Â