CDB Creation Los Angeles Tutorial

Builder_Tutorial

CDB_Builder Tutorial

This page will discuss the process of creating a new CDB using the GAJ Geospatial Enterprises LLC CDB_Builder Application. In doing this we will only use openly available data from the internet than can be downloaded at no cost. For this purpose we will describe the creation of a 2x3 deg. area of the world centered on Los Angeles California USA.

The first step in the CDB creation will be to create a directory on your system to build the CDB into. This directory should be near the top of the directory structure to avoid having any file paths that are too long. Make sure you have at least 16GB of free space on the drive that you are using. After creating the directory start CDB_Builder and select the CDB tab. If you have a folders and calendar view on the left side of the screen when you start the application for the first time use your mouse to grab the right edge of this and slide it all the way to the left which will remove it from the view. In the CDB Root Directory panel press the Select button which will bring up a file dialog. In this dialog navigate to the directory that you have created to build the CDB into and select that folder. On the system that was used to create this tutorial the root CDB directory was E:\CDB_DataSets\CDB_Demo. The program should appear something like the image below with the directory you selected in the top of the CDB Root Directory panel and nothing in the boxes below it. We should note here that the ribbon used for CDB_Builder will change depending on the screen width used with the application. The display used in creating this tutorial was 1650 x 1050. If you have a 1920 x 1080 screen you should see a more optimal ribbon view without tabs being compressed.

CDB Common Database Creation Software Tutorial

The image below shows the CDB tab with a 1920x1080 display. In this image we see that the Specification Version and Root Directories are labeled where in the smaller display they will be cut short. In cases where entire panels are shortened then clicking on the panel will display the panel as a drop down from the ribbon.

CDB Common Database Creation Software Tutorial

To create the required data to start the CDB structure press the Initialize button on the New CDB Root Directory panel. This will cause required files to be copied into the CDB Structure and necessary directories created. The Specification Version and Root Directories Combo box will be populated when complete. The CDB tab should appear something like the screen below.

CDB Common Database Creation Software Tutorial

The next step will be to import a texture library into the CDB structure. While the order of this step is not critical it must be done before the 3D model creation step described below. To do this select the Textures/Models tab. Press the Select button in the top right of the Import Texture Library panel and navigate to and select “C:\ProgramData\GAJ Geospatial Enterprises LLC\gaj-geospatial-data\TextureLibrary\textures_us\catalog.xml” in the file dialog. The screen should appear as the image below however on the system that was used to create the demo the library is in a different location. To import the library press the Import button in the Import Texture Library once. The import should be almost instantaneous with nothing else being displayed by the application. If you want to verify the import you can use windows file explorer to navigate to the GTModel\501_GTModelTexture directory under the root directory and see that files and folders have been created there. Note: The texure library provided here is from the open source osgearth library which is used by CDB_Builder as the visualization engine. You can find osgEarth here. Link to osgEarth

CDB Common Database Creation Software Tutorial

In general CDB should be created by inserting lower resolution levels before higher resolution insets. That way the boundary areas of the higher resolution data are feathered into super sampled lower resolution layer information.

The next step will be to import global background imagery for the area we are going to create. For this we will use Nasa Blue Marble data. To do this select the Imagery tab. In the Image Services panel in the center of the screen select WMTS as the Service in the bottom left drop down. In the WMS Server drop down in the top left of the Image Services panel select the entry for map1.vis.earthdata.nasa.gov entry. Next press the Query button on the Image Services panel and after a short time the Layer Name drop down in the center left area of the Image Services panel will be populated. In this drop down select the BlueMarble_NextGeneration layer. In the process limits panel enter the limits of North=34.99, South=33.01, East=-117.01, West=-119.99 as in the second image below. Leave the Limit to Bounds check box unchecked. (This will cause the bounds to be expanded out to CDB Geocell boundaries). When ready press the Process button on the Image Services panel and the insertion of the data into CDB Tiles will begin. At the bottom of the CDB_Builder window on the left side you will see a Processing status which updates which shows the percentage of Tiles that are complete. See the third image below for an example of what you should see for the processing status. This status will read “Done” when the process is complete before going to the next step. For the Blue Marble insertion this should only take a short time.

CDB Common Database Creation Software Tutorial

CDB Common Database Creation Software Tutorial

CDB Common Database Creation Software Tutorial

If you have a 1920 x 1080 display the image tab will appear as the image below.

CDB Common Database Creation Software Tutorial

When the Blue Marble insertion is complete select the CDB tab and press the Generate button on the top left of the Limits panel. The screen should appear as below.

CDB Common Database Creation Software Tutorial

To review the insertion check the Enable checkbox to the right of Imagery on the Layers panel. Also check the Use Limits checkbox on the Preview panel. Once this is set press the Preview button on the Preview panel to view the current state of the CDB. After rolling the mouse wheel forward slightly you should see something like the image below. After reviewing the data dismiss the preview by clicking the small x on the CDB_Preview.earth tab below the ribbon.

CDB Common Database Creation Software Tutorial

Select the Imagery tab again. The next step will be to add USGS NAIP data where it exists for the entire are we are processing. To do this we must first clear our imagery selection from the BlueMarble selection. To do this there is a small carrot symbol on the right side of the Query button on the Image Services panel. Click on this and press the Clear button that appears. (In general the carrot symbol on either the Query or Select button for all panels in CDB_Builder provide this function.) In the Service drop down of the Image Services panel on the bottom left of the panel select WMS/WMS-C. In the WMS Server drop down select the USGS_EROS_Ortho_NAIP server. Press the Query button on the Image Services panel and the Layer Name drop down should be populated after a few seconds. On this server there will only be layer “0”. Select this layer in the Layer Name drop down. In the Format drop down towards the upper right of the panel select png32. In the CDB Level drop just below the Format drop down select “2”. In the Options panel make sure that the Use Alpha check box is checked. The screen should appear pretty much as the first image below when the above setting are in place. In the Process Limits panel again set the limits to North=34.99, South=33.01, East=-117.01, West=-119.99 as in the second image below. Again insure that the Limits to Bounds check box in this panel is left unchecked. To insert the data press the Process button in the Image Services panel. The processing status will again be presented on the bottom left Pane and will read “Done” when complete. This process will take somewhat longer than the Blue marble insertion phase. Once the process is done clear the Image Services selection using the carrot symbol to the right of the Query button as before.

CDB Common Database Creation Software Tutorial

CDB Common Database Creation Software Tutorial

To review this insertion select the CDB tab and press the Preview button on the Preview panel. When the view comes up roll the mouse wheel forward slightly and you should get to a view that looks something like the view in the image below.

CDB Common Database Creation Software Tutorial

Dismiss the CDB_Preview window as before when you are finished reviewing the insertion.

Although the order of processing between different CDB layers is not critical in this tutorial we will now move to the insertion of Elevation data for the area. Unlike imagery map services OGC services for elevation data seem to be few and far between. This example will require download of 1/3 arc Second Elevation data from the USGS Nation Elevation dataset. This data can be found athttp://viewer.nationalmap.gov/basic/ and zooming into the Los Angeles area. If you select 1 Degree map indices the areas that you will need are Los Angeles W, Los Angeles E, San Bernardino W, Long Beach W, Long Beach E, and Santa Ana E. The image below shows the USGS website and area that will need to be downloaded. For purposes of this tutorial we are using the Erdas Imagine format which is provided as a download option from the site.

CDB Common Database Creation Software Tutorial

On the system used to create the tutorial the files have downloaded the data into separate directories and will use that in the example, if on the other hand you download everything into a single directory you may then use the Single Elevations Files panel to select the elevation files. To insert the elevation data first select the Elevation tab. On the Elevation Directories panel press the select button and navigate to the location of the elevation data you have downloaded. Select all of the required directories in the dialog box and press the Select Folder button. The selected folders will appear in the Elevation Dirs pulldown at the top left area of the Elevation Directories panel. This dropdown is mainly for selection review. You may run the selection multiple times and each selection will be added to the list in the drop down. In the Elevation ext drop down select .img. For purposes of this demo with these files the GeoCell checkbox should be checked. This indicates to the application that each file being imported represents a single CDB Geocell. It also allows for varying resolutions of the files (for instance if one file was 1/3 arc second NED and another was 1 arc second NED) the 1/3 arc second data would be processed into CDB Level 4 while the 1 arc second data would be processed into CDB Level 2. If the GeoCell check box is left unchecked then all files are process as a single area at the best resolution if they are all of a single projection. If they are not of the same projection then each file is treated as a separate insertion regardless of GeoCell boundary concerns. In general if in doubt about this leave the box unchecked. Being unchecked will almost always be required above and below the 50 deg latitude boundaries) When you are ready to process the data the screen should appear pretty much as the second image below. When you have everything set press the process button on the Elevation Directories panel. You will see the status update on the bottom left pane of the screen as the data is process. When the GeoCell check box is checked you will see the status proceed though each file in the list being processed. Note:(If you put all of the elevation files into a single directory you can select that single directory and process all of the files. Also you will need to unzip all files downloaded from USGS before processing the data) The image below shows the directory selection used in our example.

CDB Common Database Creation Software Tutorial

CDB Common Database Creation Software Tutorial

Even though we are processing elevation directories in this example we can get additional information on the elevation data by selecting an elevation file from one of the directories in the Single Elevation File panel. After selecting the file with the Select button you will also need to select it in the Elevation File drop down. When you do this the CDB Level that the elevation will be inserted into will be displayed. If the elevation file provides a no data value the Has NoData checkbox will be checked. This can be seen on the image above.

Even though we are processing elevation directories in this example we can get additional information on the elevation data by selecting an elevation file from one of the directories in the Single Elevation File panel. After selecting the file with the Select button you will also need to select it in the Elevation File drop down. When you do this the CDB Level that the elevation will be inserted into will be displayed. If the elevation file provides a no data value the Has NoData checkbox will be checked. This can be seen on the image above. When you have everything set press the Process button on the Elevation Directories panel to start the insertion.

When the elevation insertion is complete (The status pane reads a solid “Done”) select the CDB tab again and press the Generate button on the Limits panel. You should see a display that looks like the image below.

CDB Common Database Creation Software Tutorial

In the Layers panel check the Enable check box next to Elevation then press the Preview button on the Preview panel to view the imagery with elevation. After moving the eye point lower and rotating the view you should be able to get to a view that appears something like the image below.

CDB Common Database Creation Software Tutorial

The next step will be to incorporate a section of NAIP at approximately one meter resolution. To do this select the Imagery tab. Clear the Image Services selection if it has not already been cleared. Assure that the Service drop down at the bottom left of the Image Services panel reads WMS/WMS-C. In the WMS Server drop down on the top left of the panel select the USGS_EROS_Ortho_NAIP server then press the Query button. After a few seconds the Layer Name drop down in the center left of the panel will enable and in this drop down select “0” again. In the Format drop down towards the upper right of the panel select png32. In the CDB Level drop down just below the Format drop down select “7”. Insure that the Use Alpha check box in the Options panel is checked. In the Process Limits panel set the limits to North=34.143281, South=33.941614, East=-118.0524,West=-118.43482. In this panel, for this insertion make sure that the Limit to Bounds check box is checked. When you have everything set the screen should appear pretty much as the image below. When you are ready press the process button on the Image Services panel. The status will update as previously in the pane at the bottom left of the application window. This insertion will take longer to process that previous ones as it is much higher resolution. The time will not be too great however since checking the Limit to Bounds check box we are not expanding out to geocell boundaries. When the process completes again clear the Image Services panel using the carrot mark on the right had side of the Query button.

CDB Common Database Creation Software Tutorial

After the insertion is complete return to the CDB tab and press the Preview button on the Preview panel after some navigation you should be able to view that appears something like the image below.

CDB Common Database Creation Software Tutorial

Select the Imagery tab. The next step will add a smaller section of ~1ft data around the center of the downtown area. To do this again insure that the Service drop down at the bottom left of the Image Services panel is set to WMS/WMS-C. In the WMS Server drop down at the top left of the Image Services panel select the USGS_EROS_Ortho_1Foot server. (different from the previous NAIP server) Press the Query Button. When the Layer Name pull down on the center left of the panel activates select layer “0”.(It will also be the only layer on this server). In the Format drop down towards the upper right of the Image Services panel select png32. In the CDB Level drop down directly below the Format drop down select “9”. Insure that the Use Alpha check box on the Options panel is checked. Check the Elevation checkbox on the upper right of the Image Services panel and then press the Preview button on the Image Services panel. After the view initializes you will need to roll the mouse button significantly forward to achieve a globe view of the data and use the left mouse to drag the globe from the left to right till you are over the California area then zoom into the LA area. This will give you a preview of the data from the server over the CDB elevation that you previously inserted. You should be able to get to a view that appears somewhat like the image below. This step illustrates the capability to view data on the server before actually inserting the data.

CDB Common Database Creation Software Tutorial

In the Process Limits panel set the limits to North=34.0906383, South=33.988,East=-118.15367,W=-118.349231. Again in this panel insure that the Limit to Bounds check box is checked. When you are ready to proceed the screen should appear pretty much as below and the limits panel should read as the second image below. As before when you are ready to proceed press the Process button on the Image Services panel. The status pane will update as before however this insertion can be expected to take some time to complete. It would probably best to start it at the end of the day and let it run overnight. When he process is complete clear the Image Services selection as previously described.

CDB Common Database Creation Software Tutorial

CDB Common Database Creation Software Tutorial

When the process is complete return to the CDB tab and press the Preview button on the Preview panel and with some navigation you should be able to get to a view that is similar to the one below.

CDB Common Database Creation Software Tutorial

The last step in this tutorial will be to create a 3d model set from building foot prints of the Los Angeles Downtown area. The data that we will use for this is an extract of data that can be found here http://egis3.lacounty.gov/dataportal/2011/04/28/countywide-building-outlines/The full data set is much larger than the area we have prepared so we have a small subset of the data here Los_Angels.zip To process the data download the above link and unzip the file on your system. In CDB_Builder select the Textures/Models tab. In the Import Building Foot Prints panel press the Select button and use the file dialog to navigate to the downloaded and unzipped shapefile. Once you have selected the file in the Height Attr drop down select “HEIGHT”. (Note this is dataset dependent. What is required is that the data describes polygons which define building foot prints and that an attribute contains the height of the building. This is assumed to be in meters. If height is in something other than meters the Height Scale can be used to scale the value to meters.) Set the Target LOD drop down to 6.(This is pretty much arbitrary at this stage and I will probably just set this to a fixed value in a future release.) There will then be two steps to processing the data. The first will be to press the Prepare button. The process will create a temporary user defined tile set in the CDB (902_BuildingFootPrint) which contains a set of GeoPackage files containing Instance and Class Layer Geo Specific Model information as well as 3D models for each building in the vector file provided. The buildings will be textured with random textures from the texture library imported at the beginning of the process. The status process for this phase gives a running count of the models created. Once the prepare process has completed press the Finalize button to sort the data into the 100_GSFeature, 300_GSModelGeomety, and 301_GSModelTexture datasets.

CDB Common Database Creation Software Tutorial

Once the finalize operation completes move back to the CDB tab and press the Generate button on the Limits panel. The screen should appear as the image below. Check the Enable check box next to GSFeatures then press the Preview button on the Preview panel. With some navigation you should be able to get to a view that approximates the view below.

CDB Common Database Creation Software Tutorial