Mar 26 2008

Whew! A new multi-resolution 1:1 terrain is modeled

Published by at 2340h under OpenSim,Scale Issues

Terrain from a CAD-GIS data integration

Over the past four weeks I’ve participated in a burst of effort that has involved multiple resolutions of GIS data to describe a campus terrain in an eastern US state. It’s been over twelve years since I’d worked with a 3D CAD design for a slope design, and this one brought back memories and put detail into a much finer scale, working with 30cm contours around one new building, where my earlier efforts were more like 2m contours over a large industrial site. All the same, having once “written” a slope design, I found it possible to “read” the design work that existed in various layers, some 3D and some 2D, in a new site design.

One of the beautiful and satisfying aspects of GIS work can be the integration of disparate data sets into a spatially coherent whole. In this case, I sought to make an OpenSim terrain that would be home to a very complicated build where two CAD drawings held structure details, a third held the site and design terrain, and as is often the case, a merge with surrounding seamless USGS DEMs was desired.

The first step was to ensure that the site base map and structure plans matched scale and could be lined up. A combination of grounding mat and retaining walls in the site plan made that possible, and in ArcGIS, the AutoCAD DWGs for the structure were translated onto the site plan drawing. That was a lot of work, with over 2Meg of polylines in the structure, and I knew from my Berkurodam build that keeping a complex structure square with the region grid would be frequently appreciated by those working this build.

To earn the appreciation of the build workers while merging the region with the surrounding world, it was necessary to define a projection-referenced local coordinate system for the campus. Mercifully, the site plan contained many building footprints across the street from the construction site, and these were easily identified in publicly available regional 30cm orthoimagery. I chose a well-defined corner of one building as my pivot point, calculated both WGS84 UTM meters and local campus grid inches (converted to meters) for that point, and defined grid north as 014 degrees azimuth on the UTM grid.

The facility for defining a local grid this way is easy in ESRI ArcGIS, and with it I could create a Feature Dataset dimensioned in meters for the campus grid. I was able to export the CAD drawing polylines into an inches-denominated version of the campus grid, then select a fistful of layers and export those into the meters-denominated campus grid for editing and 3D terrain work. It was especially helpful to have ArcGIS’s ability to project the UTM-based orthos into the local grid, as I was not able to figure out how to include an arbitrary grid rotation in an ERDAS custom projection. Once I knew that I had a projection-based local grid definition and could move GIS features and imagery back and forth from UTM, I imported two 1:24,000 sheets’ worth of 10-meter DEM data, about 6km by 7km of 30cm natural color imagery, and I was comfortable diving into the grading plan model knowing that regional context would be available.

The greatest labor involved reading the site plan drawing in detail, clipping out regraded areas from the existing terrain which was a 3D drawing, then editing each segment of each contour in the grading plan (sadly a 2D drawing) to have the proper elevation attribute so that it could flow into the existing terrain contour. A lot of this took careful contour reading and switching views between the multilayer DWG view in one ArcMap session (where I could read all the annotation like contour labels), and the imported polyline contours being edited sans annotation in another ArcMap session (where I had not had success importing the CAD annotation). One of my first realizations when I started keeping two ArcMap sessions running (to keep an eye on the CAD annotation) was that I had misread the drainage swales and had grown them out of the terrain, placing drainage lines farther upslope that was actually in the design.

After a couple of weeks calendar time, I had completed what might be the first 3D CAD model of the site as it was designed. At least, if a 3D model already existed, I did not have access to it. When every segment of every contour had the proper elevation attribute, I regenerated the 3D polylines with Z values only from the attributes. Then using typical techniques, I created a TIN with hard breaks on the contours, and ground out both 1-meter and 0.5-meter postings of gridded terrain from the TIN. This provided highly detailed terrain for at least one OpenSim region.

Grid merge of CAD terrain with regional DEM terrain

Merging this 1-meter posting terrain with 10-meter regional data that had been rotated 14 degrees was the next challenge. First, I made an effort to harmonize the vertical datums. The regional DEMs had typically excellent metadata and with very little interpretation, made it possible to define them as WGS84 NGVD29 meters, which I recalculated to WGS84-Geoid2003 NAVD88 meters. The CAD site plan fit most closely with the resulting grid when I just defined it as WGS84-Geoid2003 NAVD88 meters (from design Z-inches), although it remains about 1.5 meters lower at its edges than regional DEM, when overlaid on the regional data.

The typical challenges of oversampling coarse grids were quite graphic in the regional data. After using ArcGIS to project a WGS84 UTM copy of the regional DEM into the campus grid, I used ERDAS Imagine to resample that 10-meter source into a 1-meter working model. Having 100 grid cells with identical elevation looked unnatural at best, so I used an ERDAS focal analysis with a 7×7 kernel to estimate a mean value for every cell in the 1-meter resampled version of the local-grid-projected version of the regional DEM. While normally this would be an extreme focal analysis, it seemed to produce a reasonable result for the 10×10 oversampled regional DEM.

When the regional grid was prepared, I used ERDAS mosaicking to overlay the detailed site plan, and then found a desirable origin point and clipped a subset 768m by 1024m area that, based on the co-registered 30cm ortho imagery, just covered the campus area with 1-meter posting terrain and could be stood up as 12 OpenSim regions at 1:1 scale.

For texturing purposes, I used ERDAS to resample the campus grid version of the orthos that had been reprojected by ArcGIS, from the original 30cm to 25cm pixels. This allowed clipping of a subset of the model area as a 3072 x 4096 image, providing a 1024×1024 texture for each OpenSim region after dicing. For demonstration purposes, and as a guide to build-out of less detailed structures around the campus, these ortho tiles are used to texture on a 256m by 256m by 0.4m horizontal megaprim plate centered on each region. These textured megaprim plates make it easy to calculate sim region coordinates for buildings and objects visible in the ortho imagery.  These calculations should be useful when synchronizing real-world activity with its simulator facsimile.

Easterly view of 12-region campus-wide model

No responses yet

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.