Chapter 21 | Google Maps


Google Maps Import Tool

Note: A critical software update for the Google Maps was released with the Fall 2022 Software Update for VC4, VC5, and VC for Public Safety. You must either update or do a new install to continue using this feature.

Virtual Tutor: Go to help > google maps > insert to learn more about using the Google Maps import tool. 

With Virtual CRASH, you can now import Google Maps aerial photos with terrain elevation data directly from the Virtual CRASH user interface. In order to access Google’s terrain elevation data, you will first need a Google API key. It is highly recommended for users to obtain the needed API key before using the Google Maps feature. 

Google API Key

To access the Google Maps import tool, simply left-click on Create > Google > Google Maps. 

If you do not already have a Google API key set up, you will see the Google Settings prompt appear (see below). 

In order to use the Google Maps tool, you will need an application programming interface key (“API key”) from Google. If you do not already have a Google API key set up, please carefully follow the steps in our Blog post: 
http://www.vcrashusa.com/blog/2018/8/7/steps-to-generate-your-google-api-key
 

 

In some instances, depending on your version of Microsoft Internet Explorer or Edge browser, you may see the warning at the top of the Google Maps display window (see below) “You are using a browser that is not supported by the Google Maps JavaScript API. Consider changing your browser.” Virtual CRASH uses the Microsoft web browsers simply for the interactive Google Maps image display. This message is not related to Virtual CRASH functionality, but is simply a notice to users of Microsoft web browsers. 

Should you see this warning, simply left-click on “Dismiss” and continue with the image import process described below.

Note, if this warning is visible in the Google Maps image preview window, failing to press “Dismiss” will cause the warning to also appear in the imported image if the region selection option is not used.

Google maps Interface

Using the Google Maps interface, enter the address of the location you wish to download. 

Using the “Map Type” dropdown menu, one can select from roadmap, satellite, hybrid (satellite with road labels), or terrain map image options.

By default, Virtual CRASH will download the image shown within the display window; however, using the “Region” option allows one to specify the specific region of interest using a box selection tool. Simply left-click on “Region” and then left-click on the box control grips to adjust the selection area (Virtual Tutor: Go to help > google maps > region). Virtual CRASH will partition the selected area into a grid and download and mosaic the needed images from Google using the highest quality images possible. You will likely need experiment to understand the tradeoff between image resolution quality and selection area size given hardware limitations on displaying large amounts of high resolution images simultaneously.

Terrain elevation data may be used by left-clicking on the “Elevation” dropdown menu (Virtual Tutor: Go to help > google maps > elevation). The selected area will be partitioned into a grid of either 50 x 50 cells, 100 x 100 cells, or 150 x 150 cells, depending on which option is selected. Google’s terrain elevation data will then be used to set the point height for each cell. Virtual CRASH will then construct a 3D wireframe mesh based on this grid. 

Once you are satisfied with your options, left-click on the save button (disk icon) and Virtual CRASH will download and then display your data automatically.

Once saved, you will see the folder of image files and terrain mesh object in the project menu. Either can be hidden or frozen as needed. Note, as with any mesh object, you will need to select Create > Physics > Make Unyielding/Terrain from Selection to convert the Google Maps terrain mesh into a terrain object (in the image below, the mesh is labeled “google map002”) if you intend your vehicles to drive on top of it. The process of converting the Google mesh into a terrain object is shown in the video below.

The resulting terrain is shown below.

Opening the images folder, we see individual image files for each tile in the mosaic. Like any image imported into Virtual CRASH, these can be hidden, translated, or rotated. Below, two of the images in the mosaic are hidden, as well as the terrain mesh. 

As with any mesh object in Virtual CRASH, the vertices and polygon faces can be modified as needed. In the case of the resulting terrain mesh, one may wish to make adjustments to the individual road vertices.  

An example simulation using this scene can be found below:

Note: Google Maps Elevation data measurements are based on a variety of sources, including space based instruments, and are known to have large differences with respect to direct ground instrument measurements, which can easily exceed a few feet. Care must be taken when using Google Maps Elevation data, especially when using the resulting terrain surface for vehicle simulations. For the most accurate simulation results, it is highly recommended to use direct scene measurements (total station, laser scanner, or drone based) to build 3D simulation terrains for your accident scene, and overlay or substitute the resulting terrain mesh from your direct measurement on top of the Google Earth based mesh. Additionally, while it is well know that aerial imagery from Google Maps generally provides reasonably accurate representations of various scenes, it is highly recommended that the accuracy of Google Maps aerial imagery products be verified using direct scene measurements as well. We do not, nor cannot, guarantee the accuracy of Google Maps products, as these products are based on Google’s proprietary data and methods. To learn more, visit: https://enterprise.google.com/maps/. We remind all users of Virtual CRASH brand products that in using Google Maps products, you are subject to Google Map API’s terms of service, which can be found here: https://developers.google.com/maps/terms.



© 2024 Virtual CRASH, LLC. All Rights Reserved