Draping Imagery Textures on Terrain Surfaces

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

Introduction

Draping can be done for both textures and vector geometries. This example will focus primarily on textures, which can be draped over any solid or surface.

Textures have been used as a representative way of assessing GIS, BIM and other models, so that users can make informed business decisions about their data. 

The act of draping is referred to as overlaying a 2D feature, also referred to as textures, onto a 3D feature. Let’s walk through the workspace provided in  DrapingTextures_Hawaii.zip. In this scenario we have draped a PNG Landsat image of two islands in Hawaii, Lanai and Molokai, over TIN surfaces. The workspace below uses contour data to generate the TIN surfaces for both islands. Then Landsat images are added as textures, covering the TIN surface. The Landsat image now acts as a background for the entire scene.



 

World DEM Texture Example

If the workspace above looks a little bit too complex, here are some steps to create a simpler workspace, where we use a global DEM to demonstrate draping textures. You can also download DrapingTextures_World.zip to follow along with the exercise.

1. Open FME Workbench on your machine. Create a New workspace.

2. Add a Microsoft Excel Reader to the canvas. Assign the dataset to the WorldDEM spreadsheet, WorldDEM.xlsx. Open the Reader parameters and assign X,Y, and Z as the number type. Click OK twice to add the Reader Feature Type to the canvas.
 


3. Add an ExpressionEvaluator and create a new attribute called _z_scaled using this arithmetic expression: 
(@Value(z)/500.0) 
 
 
4. Next, the VertexCreator will be used to create point data from the WorldDEM spreadsheet coordinates. Assign the values accordingly, make sure to use the new _z_scaled attribute for the Z Value.
 

5. Add a TINGenerator to create a TINSurface. Connect the Output port from the VertexCreator to the Points/Lines input port on the TINGenerator. Apply a Surface Tolerance of 1. The surface tolerance parameter determines which input points to add to the surface model as vertices.
 
 
6. Before we can progress, we have to read the world JPEG into FME. Add a JPEG Reader to the canvas and direct the source file to WorldImg.jpg.

7. Add an AppearanceSetter to the canvas. This transformer sets appearance styles onto the front and/or back sides of geometries. Connect the JPEG Reader to the Appearance port, and the TINSurface to the Geometry port. Within the parameters, set Texture Mapping Type to From Top View. 


8. Finally, add a Adobe 3D PDF Writer. Within the parameters, under Coordinate System, set Move to Local Coordinate System to No.
 
 
Click OK and ensure that the Layer Definition on the Writer is set to Copy from Reader.  Click OK again, and another window will appear prompting you to select one of the existing Reader feature types since we’re copying the schema definition from the Reader. Select the Excel spreadsheet and click OK. Run your workspace, and view your results.

The final results should look similar to the image below: 

 

Data Attribution

Lanai and Molokai island data provided by the Hawaiian Statewide GIS Open Geospatial Data Portal.
The World DEM was provided by the National Oceanic and Atmospheric Administration (NOAA) - National Centers for Environmental Information .  

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.