building 3d pdfs to visualize geological data · 2020. 5. 28. · building 3d pdfs to visualize...

16
Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015 Part 1: Subsurface geometry using Python and ArcScene – David A. Jeschke Part 2: Building professional-quality 3D PFD files based on ArcScene export files using ReportGen – Daniel W. Eungard

Upload: others

Post on 27-Sep-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

Building 3D PDFs to Visualize Geological Data

Daniel W. Eungard and David A. Jeschke

Digital Mapping Techniques 2015

Part 1: Subsurface geometry using Python and ArcScene – David A. Jeschke

Part 2: Building professional-quality 3D PFD files based on ArcScene export files using ReportGen – Daniel W. Eungard

Presenter
Presentation Notes
Primary contact: Daniel Eungard Washington State Department of Natural Resources (DNR) Phone: 360-902-1463 Email: [email protected]
Page 2: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

Line of cross section A-A’

Cross section inset A-A’

The map reader must attemptto visualize the terrain and subsurface geology from these two elements.

Presenter
Presentation Notes
Geologic maps traditionally consist of 2D products on paper, or more recently in digital format as a pdf. These maps typically contain geologic cross sections that visually convey topographic and subsurface conditions to the reader. Proper interpretation of these map products can be difficult and potentially cause confusion and misinterpretation. Our goal is to help the readers avoid such confusion by displaying the geologic information in 3D space. To accomplish this, we have developed a method to take the published information and display it spatially using ESRI ArcMap, ArcScene, and PDF3D ReportGen to create a model that is viewable in Adobe Reader/Viewer.
Page 3: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

Our profile (below) begins in ArcMap and is finished in Illustrator

The profile geometry poses a challenge for 3D visualization:

• The X axis on the profile view represents distance along the line of cross section: a combination of X and Y in plan-view coordinates

• The Y axis on the profile represents the Z axis in plan-view coordinates

• These coordinates must be translated into an ArcScene readable format

Presenter
Presentation Notes
Originally, a geologist creates polygons for the geologic map and cross sections in ArcMap at the correct spatial location and the projection origin respectively. The plate for the publication derives from the export of these polygons to Adobe Illustrator. Final changes are then applied in Illustrator. The finished geologic map is georeferenced back into ArcMap; however, the cross sections pose a larger challenge. In ArcMap, the cross section displays in map view with X-axis representing the length of cross section and Y-axis represents the vertical dimension (Z). The line of cross section on the map represents both X and Y coordinates. These sets of coordinate values need to be translated so that Y becomes Z from the cross section and individual X and Y coordinates are generated from the line of cross section. Once translated, the cross section will display properly in ArcScene.
Page 4: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

What can ArcScene read?

• X and Y coordinates are from feature geometry

• Z coordinates are from feature attributes

• These borings are “extruded” using elevation at the top and bottom of each layer

• Each boring is multiple polygons; each has its own top and bottom elevations, and geologic symbol

Presenter
Presentation Notes
ArcScene provides a method of displaying polygons in 3D by reading XY values from feature geometry and Z values from attribute data. In the example provided, a buffered borehole is “extruded” with the top and bottom elevation of each geologic layer stored as attribute data. Each boring depicted derives from multiple polygons (one for each layer) that are stacked forming a visually continuous cylinder. We can use the same method here to show the geologic units in the cross section as a series of extruded polygons.
Page 5: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

Preparing cross section data for display in ArcScene

• Depths of units vary continuously over the length of the line of cross section

• Each feature “extruded” in ArcScene must have discrete top and bottom elevations

• This presents a quandary: depth values must change and yet cannot change

Building 3D cross sections

Export VRML data

Modify VRML files

Modify state file

Complete model

Build model in ReportGen

Presenter
Presentation Notes
A challenge presents itself however, as ArcScene will only extrude features with discrete elevations, making it impossible to draw curved surfaces. Depth values for a geologic unit changes with distance however; the polygon can have only a single elevation value.
Page 6: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

Our solution: chop the cross section into itty-bitty vertical slices

• We build overlapping 10 foot lines along the line of cross section

• Each overlapping line represents one geologic unit

• Each has its own top and bottom depths, and unit symbol

• Curves become “discretized” into imperceptibly small horizontal lines

Building 3D cross sections

Export VRML data

Modify VRML files

Modify state file

Complete model

Build model in ReportGen

Presenter
Presentation Notes
Our solution is to “discretize” the cross section polygons by slicing each into small segments. This achieves an overall appearance of a curved surface when viewed at a reasonable distance while still maintaining the discrete elevations required by ArcScene. For a given “slice” of the line of cross section there will be a line created for each geologic unit encountered at depth. For a typical 7.5-minute quadrangle cross section, we find that a 10-foot interval is a good balance between appearance and file size.
Page 7: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

X and Y coordinates must be found for the start and end points of each 10 foot line segment

• X and Y coordinates are found for 1st and 2nd nodes in line of cross section

• The difference in X coordinates, and the difference in Y coordinates are determined

• The number of 10 foot line segments is determined

• The change in X and Y are divided by the number of 10 foot segments

• This represents the change in X, (ΔX) and the change in Y, (ΔY) for each 10 foot segment

• Lines are built in a feature class with X and Y coordinates for endpoints incrementing by ΔX and ΔY

• Attributes for Top Elevation, Bottom Elevation, and Geologic Unit are coded for each new line built

Building 3D cross sections

Export VRML data

Modify VRML files

Modify state file

Complete model

Build model in ReportGen

Presenter
Presentation Notes
The outline of the process for each major step is as follows: The XY coordinates are located for the vertices in the line of cross section The difference between X and Y coordinate is calculated for each vertex pair The total of 10-foot sections calculates from the line segment length The change in X and change in Y are calculated for each 10 foot segment Attributes for top and bottom elevation and the geologic unit originate from the cross section and coded into the lines while being built A line feature class stores the calculated line segments with applied attributes While this is a simplification of all the steps required in the process, it is evident that this processing requires extensive calculations.
Page 8: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

All of this processing is done using an ArcGIS script tool

This tool calls on a Python script we wrote for this purpose (a portion of the script is shown at left)

Building 3D cross sections

Export VRML data

Modify VRML files

Modify state file

Complete model

Build model in ReportGen

Presenter
Presentation Notes
We automate these calculations through a script tool written in Python. With the proper inputs provided, the script tool will create a feature class consisting of many short lines with attribute data for geologic unit symbol, top depth, and bottom depth.
Page 9: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

The 3D cross section displayed in ArcScene

This is still not accessible to most users

So we export it to VRML (only export option) and …

*Cross section as viewed in ArcScene. Note the discretized segments are apparent due to ArcScene’s renderer.

Building 3D cross sections

Export VRML data

Modify VRML files

Modify state file

Complete model

Build model in ReportGen

Presenter
Presentation Notes
We can now add the feature class created by our custom script tool into ArcScene. Base height is set to the top elevation, extrusion is set to the bottom height (with “elevation features are extruded to” selected), and symbology set to unique values based on the geologic unit. As the image shows, the cross section has the correct orientation and scale with little or no evidence of the discretizing process aside from some unusual shading from the scene’s renderer. This cross section can now be exported from ArcScene into a VRML (.wrl) file format, which stores the physical attributes (color, transparency), and 3D geometry of each object in the scene.
Page 10: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

Preparation for conversion

VRML files export each scene feature as a “Shape”. This means nothing to the user and is not very helpful.

We can open the VRML in a text editor and give each Shape a name.

As ArcScene groups shapes by color and transparency, each geologic unit is represented separate from the rest.

*Before and after of VRML file in Notepad++, notice the change in line 145

Building 3D cross sections

Export VRML data

Modify VRML files

Modify state file

Complete model

Build model in ReportGen

Presenter
Presentation Notes
Regrettably, the export process removes any attribution that the ArcScene objects had and consequently each geologic unit exists as a generic “Shape” object. We can override the name however, with a minor bit of modification to the .wrl file. Opening the .wrl in a text editor reveals human-readable Unicode text. By replacing “Shape”, with “DEF ‘your_text_here’ Shape” we rename each object to the correct geologic unit symbol. This process is tedious and highly consuming if done entirely manually; again a python script tool automates this step. The script reads the feature class that the .wrl generates from, reads the old .wrl, and writes out a new .wrl file with the instances of “Shape” replaced by the appropriate unit tag. This step now completes in 10s of seconds where it would typically take an hour or more if done by hand.
Page 11: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

We bring it into ReportGen, a software developed by PDF3D for creating 3D pdfs from spatial data.

This allows us to take an inaccessible VRML file and convert it into a very accessible PDF

* ReportGen software with model built.

Building 3D cross sections

Export VRML data

Modify VRML files

Modify state file

Complete model

Build model in ReportGen

Presenter
Presentation Notes
Launch the PDF3D ReportGen software and add the .wrl files. The software will read the file and convert it into an .u3d file that is readable by Adobe Acrobat. The program then embeds the .u3d into a .pdf file turning it into a 3D pdf. This 3D pdf is now viewable by any computer running Adobe Reader v.7 or higher.
Page 12: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

An Aside:

Q: I don’t have or like ArcScene, do I need to use it?

A: No, you don’t. We chose to use it as we can visualize our models prior to conversion and for the ease of symbolization.

However, as you can see, ReportGen can handle many file formats directly including Shapefiles, ASC, XML, KML and many more…

Building 3D cross sections

Export VRML data

Modify VRML files

Modify state file

Complete model

Build model in ReportGen

Presenter
Presentation Notes
PDF3D ReportGen is not limited to only importing .wrl files. It can handle most geospatial data types including (but not limited to) LAZ, DEM, IMG, SHP, ASC, KML, and TIF to name a few. This makes it a very useful tool as a data may originate from a wide variety of sources.
Page 13: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

Reportgen produces a “state file” for the conversion written in XML.

This means that we can modify it to change some parameters and add data such as unit symbols, descriptions, ages, you name it!

These descriptions were pulled from GIS and formatted in Excel to produce proper XML tags.

An entire map’s worth of data can be converted in <10 minutes.

Building 3D cross sections

Export VRML data

Modify VRML files

Modify state file

Complete model

Build model in ReportGen

Presenter
Presentation Notes
With the data brought into ReportGen and all the desired settings are applied, we export a “state file” for additional processing. This file holds all the commands and settings required for the ReportGen software to build a 3D model. Luckily the file is written in .xml and is human readable. Here we can add additional data to the model to replace the attribute information from shapes removed by the .wrl export from ArcScene. In this case, we replaced the data for the geologic unit name, age, and description. The data must have properly formatted xml tags to attach correctly to the model. Another python script tool automatically reads the geologic information out of a tabular dataset, formats it, and makes it ready to paste into the state file.
Page 14: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

Javascript is Acrobat’s bread and butter, with it we can make tools to change the behavior or provide additional tools to the user.

The last step for us is to add a custom Javascript which will display our data on the PDF page when a unit is clicked.

*unit description provided when unit is clicked in model

Building 3D cross sections

Export VRML data

Modify VRML files

Modify state file

Complete model

Build model in ReportGen

Presenter
Presentation Notes
JavaScript allows for the addition of tools or customization to the model and Adobe has several manuals easily found online which explains the use of JavaScript in both regular and 3D PDF. In this case, we chose to create our own object data tool (metadata tool) which will display a selected shape’s data instead of using the prebuilt one for aesthetic reasons.
Page 15: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

Final Product!!!

Building 3D cross sections

Export VRML data

Modify VRML files

Modify state file

Complete model

Build model in ReportGen

Presenter
Presentation Notes
Once converted by ReportGen, the final PDF is fully interactive and viewable. At this step, creation of custom views aid in drawing the user’s attention to important features of the model. It is strongly suggested that the final PDF (once all views and settings are applied) be saved as a “Reduced size PDF” in order to optimize the file and reduce file size. For a typical 7.5-minute quadrangle map with cross sections, file size can range from 40-70 Mb. The performance of the PDF may vary on different workstations and we suggest including a reminder to users that it may take a minute or two to load on slower computers.
Page 16: Building 3D PDFs to Visualize Geological Data · 2020. 5. 28. · Building 3D PDFs to Visualize Geological Data Daniel W. Eungard and David A. Jeschke Digital Mapping Techniques 2015

End of slideshow and beginning of live demonstration

For those who couldn’t attend, follow along using any 3D model and the tutorials available at:

WA DGER 3D Geology webpage: http://www.dnr.wa.gov/programs-and-services/geology/geologic-

maps/3d-geologyTutorial PDF:

https://fortress.wa.gov/dnr/geologydata/cartography/3d/3D_PDF_geologic_map_user_guide.pdf

Tutorial Video:https://www.youtube.com/watch?v=b6wyGGqBVWM

Links are subject to change, see dnr.wa.gov if links here are broken.

Building 3D cross sections

Export VRML data

Modify VRML files

Modify state file

Complete model

Build model in ReportGen

Presenter
Presentation Notes
At this point, there was a live demonstration provided to the audience of the DMT 2015 Conference. For those unable to attend, the Washington State DNR Division of Geology and Earth Resources has a 3D geology page (http://www.dnr.wa.gov/programs-and-services/geology/geologic-maps/3d-geology) with links to tutorial videos, instructional pdf, and a large series of 3D PDFs.