span8
span4
span8
span4
Since LiDAR point cloud data contains information about any surface that returns its laser,we can use it to model terrain as well as building shapes.This is exactly what we set out to do in this demo,where an LAS point cloud is used to (1) build a triangular irregular network (TIN) terrain model and (2) extrude building footprints to their actual 3D height.Each of these two steps becomes a layer in our output: a 3D model written to PDF that captures the urban built environment in a Vancouver neighbourhood.
There are two tricks to this 亚搏在线workflow: (1) extracting and replacing the building footprint geometry (vector data),and (2) clipping the point cloud using the building footprints.In short,we will isolate the point clouds for each individual building footprint,and then extrude these footprints into 3D solids.Follow the step-by-step process below to find out more about how to set up this 3D point cloud 亚搏在线workflow!
CAD building outlines:
LAS point cloud:
The point cloud data for the City of Vancouver is stored in the ASPRS LiDAR Data Exchange Format (LAS),an industry standard for 3D point clouds.Building outlines and base heights are read from a vector ACAD DWG file.Read in both files:
source_data\LAS.laz
Add a reader for the AutoCAD DWG building footprint file.When reading in the CAD file,remember to go into the Parameters and set ‘Group Entities By': to‘Attribute Schema'in order to have access to the base heights attributes for extruding later.
source_data\building_outlines.dwg
Add aGeometryExtractorand connect the building footprints to store the current geometry in an attribute on the feature.This can be very useful if a feature's geometry has to be temporarily altered in order to obtain additional information,as is the case when we combine this data with the point cloud in the next steps.Extracting a feature's original geometry allows it to be restored at any time.We'll restore the building footprint geometry once we're ready to extrude the buildings into three dimensions.
In theGeometryExtractorparameters,make sure that the Geometry Encoding is set to‘FME Binary'and the Destination Geometry Attribute is_geometry.We will not need to remove geometry.
If you would like to run your translation now,remember to adjust feature handling so that the translation doesn't terminate when it rejects features.You can do this by going to:
Navigator > Workspace Parameters > Translation > Reject Feature Handling:
Change it to Continue Translation.
Classified point clouds will contain a component which stores the classification,usually as a coded numeric value.This classification is typically used to distinguish between points that belong to the ground,vegetation,buildings,etc.Add aPointCloudFilterto the LAS reader and use the following expressions to filter out points classified as Buildings or Ground (note that [comments] are in square brackets,and not to be included in your expression)
@Component(classification)==6 [Buildings Port]
@Component(classification)==2 [Ground Port]
Here's the workspace up to this point:
To get height values for every building,clip the point cloud by the building outline features.Add aClipperand connect the filtered Buildings points to theClippeeport and the building outlines to theClipperport.To preserve the attributes of the Clipper,check the‘Merge Attributes'parameter in theClippertransformer.Set the ‘Accumulation Mode' to 'Merge Clipper',and Conflict Resolution to‘Use Clippee'.This means that we will keep the point cloud (clippee) attributes and resolve any conflicts in merging by preserving the point cloud attributes.The result is a point cloud for every building!
Connect the Inside output port from theClipperto aPointCloudStatisticsCalculatortransformer.Open thePointCloudStatisticsCalculatorproperties and check the box to get the median values for every building's point cloud and store this on each feature as an attribute.Median is used since the roof provides most of the points in the point cloud.We don't use max point cloud height since this includes things like antennas that are not representative of actual building height.
Use theGeometryReplacerto restore the geometry from the attribute_geometry
.Now every building has its original vector geometry and has value for median height derived from the point cloud.
Since the z.median value derived from thePointCloudStatisticsCalculatorrepresents height above sea level and not the true height of the building,we need a logical way to find the height of the building based on the two pieces of elevation data that we have: the elevation of the building footprint (base_height) and the elevation of the building rooftop (z.median).Add a3DForcerto set the base heights to the base_height attribute from the source DWG building outlines.Once the base elevation is correct,we can accurately extrude the building height from the building's base elevation to the median point cloud height using some simple subtraction.
If base_height is not appearing as an option for you,make sure that your reader parameters are set to Group Entries By: Attribute Schema.Replace the reader to access the additional parameters.
An extrusion is defined as the extension of an object by an additional dimension.In our case,we want to project our 2D building footprints into 3D buildings.To achieve this,we add anExtruder transformer to extrude the buildings by the rooftop height derived from the point clouds minus the base elevation.Use the Arithmetic editor in theExtruderand enter the following expression in the Distance field:
@Value(z.median)-@Value(base_height)
The 2D building outline polygons become 3D solids based on the height values of the building.
A surface will be created with the ground points to fill in the terrain surrounding the buildings.Add aTINGeneratortransformer and connect the Ground output port from thePointCloudFilterto the Points/Lines input port of theTINGenerator.The surface tolerance parameter of theTINGeneratordetermines which input points are added as vertices to the model.In our case,a value of 1 is suitable.The larger the value,the more input points will be filtered out.
The TIN surface and extruded buildings can be written to any format that supports surfaces or meshes such as Sketchup,3 d PDF,AutoDesk FBX,etc.In this example,we will write to an Adobe 3D PDF and create two destination feature types,one for the building and one for the ground.Connect the extruded buildings and the TINSurface output port from theTINGeneratorto their respective feature types.
To create a single pdf,you will write out two feature types into a single writer:
Now,when you go to your Navigator to view the writers,notice that there are two Feature Types in the Buildings writer.Run the workspace to generate a PDF file and view the PDF file with the Adobe PDF Reader.Congratulations!You have written out 332
features for outlines and 1 feature for the TIN.If you decide to make any changes and run the translation again,make sure that you have closed any open PDFs before starting the translation again.
3D Model viewed in Adobe PDF Reader:
Alternate Approach - Building Heights from Point Cloud
If you don't have building height/elevation data present in your vector building footprints,you can retrieve the base heights of the buildings from the point cloud data rather than from the existing attribute.Before you extrude,it is best to drape the building outlines on the TIN surface.To create a flat base,there should be only onez
value per outline.To achieve this,SurfaceDraper,CoordinateExtractorandStatisticsCalculatorare a good place to start!
This 亚搏在线workflow highlights the power of thePointCloudFilterfor working with LAS files as well as the potential in FME to combine multiple files of different types into a valuable information product.With vector building footprints and a point cloud,we've extracted elevation data,merged the geometries,extruded 3D solids,and created a surface and building model that,once written altogether to PDF,can easily be shared and viewed in a PDF reader by colleagues unfamiliar with GIS or without access to FME Desktop.
I tried exactly the same procedure you mentioned above (minus the Buildings part).
but I got no output,i can not visualize the 3D terrain model.I guess I m missing something adn Iw mas wondering if you can help.
I can not see any results neither in FME inspector nor in Sketch up 2016
Can you kindly advise what am I missing,Please find attached my .fmw file
@heikalThe workspace seems fine,but we'll need to take a better look at what TINGenerator settings work best with your data.I see you've already opened a case with our support team so they will follow up with you.
© 2019 亚搏在线Safe Software Inc |Legal