Tuesday, January 09, 2007

Google Earth as a Geographic Information System

The first work that I did with Google Earth and KML was to build a converter in ArcMap that would export all of the selected layers out to KML. We used this for an emergency response tool set that worked in ArcMap. The idea was that the mapping would be managed by someone trained in using GIS who would them automatically kick-out KML updates to a server to be viewed using GE networklinks by commanders.

This worked really well, but at the time, I wondered if it would be possible for Google Earth to act more as an interactive partner rather than a static viewer. When it came to having GIS capabilities, Google Earth has never really been considered (for good reason).

However, the more I thought about it, the more I wondered if GIS type functions used for command and control applications could not be accessed and used by Google Earth. What I really wanted to do was to used open-source functions with not license restrictions to create a GIS back end, and then have Google Earth act as the interface.

When Google Earth officially announced that they had a COM API, I started looking a bit more at the possibility of being able to interact more effectively with Google Earth. I noticed some update functions that I thought might help . I first mentioned this in the beginning of December when I wrote New Google Earth API Allows for GIS Type Interaction.

I was able to use this new API function to select coordinates directly from Google Earth. This has huge implications, as I can use these coordinates to Select and Identify GIS data. I can now marry this capability with Shape2Earth, which allows me to Import GIS directly into Google Earth.

So, now I can load GIS data directly into Google Earth, and I can query and select this data using Google Earth. The next thing I want to do is actually create data and launch geoprocessing functions from Google Earth. Here is how I do that.

To start with, I have the Google Earth Render window embedded in my application (I'm using GoogleEarthAirlines to do this), and I have loaded GIS data using a modified form of Shape2Earth.


To show how I can interact with Google Earth similar to a GIS, I'll walk through an emergency response scenario. I am given a building at which there is an incident, I can do a quick search using either the building name, ID, or a coordinate. I use MapWindow GIS components to search for the building information in the shapefile, and then zoom to the location.
When I get to the area of interest, I want to Cordon (buffer) off the affected area. I first select my Cordon tool and click on Google Earth to set the center point (I could also select the building and create a cordon around that). The point (or selected feature) is sent to my cordon tool. I then select the size of the cordon, the measurement units (feet, meters, etc.), and the number of rings I would like. In this case, 2000 feet with 1 ring.
MapWindow GIS components are used to create the buffer (shown below). Shape2Earth creates a kml file and a shapefile to represent the new geospatial data set.

The next thing I want to do is determine what buildings are impacted by this event. MapWindow GIS components select the buildings using the cordon polygon. Shape2Earth modifies the color of the kml and reloads is quickly into Google Earth (see below). The same process is used to select affected roads, and to set up traffic control points to isolate the area.
All of these new data are saved as kml with associated shapefiles as described in Importing GIS Data into Google Earth.


Since my GIS data and KML are linked, and I can grab coordinates off of the map, I can change the status of buildings simply by clicking on them in Google Earth (note that the orientation of Google Earth does not matter, not does the location that you click). This brings up a dialog box that lets me edit the GIS data which also changes the color of the KML.

Above, GIS data is selected and edited directly in Google Earth.
Below, the KML file is update and reloaded.


Combining the visualization of Google Earth with the power of GIS leads to some very effective capabilities. The data can be immediately served out to other clients, such as another Google Earth as seen in the graphics below.



GIS Data viewed and edited in Google Earth above

Created GIS data viewed in another Google Earth Client in near real-time



Besides being able to edit GIS attribute data, we can create GIS data by digitizing directly on Google Earth. The graphic above shows a sketched route that is converted to a shapefile.







10 comments:

  1. Hi, great postings, very informative. I am a GIS student at the British Columbia Institute of Technology in Vancouver, working on a project which examines the uses Google Earth can be put to in emergency response situations. I am wondering how complicated this kind of application is, or if you might have any suggestions for a burgeoning GIS cohort.

    ReplyDelete
  2. Anonymous3:44 AM

    Thanks for the nice post!

    ReplyDelete
  3. Hi, thanks for pointing me to the right directions...btw do you happen to know how one can programmatically delete the kmls in "temporary places"?

    ReplyDelete
  4. There is currently no direct way to delete a loaded KML. The typical workaround is to write an empty KML that overwrites the loaded KML, and then reload it. Another similar method is to use network links locally. You can change the KML file that the link points to and then reload it.

    ReplyDelete
  5. Hello Sir

    Very descripive and informative posting. I am working on a project focused on navigating Google earth on the basis of some KML files made on the infroamtion gathered from AMOS-II data base. I wanted to ask if you have some idea to get the result search information from google earth with the help of their COM API. I am interested in name,coordiants and other useful information once we post a search on google earth and it comes up with required destination. I means once we look for Uppsala University Sweden, We would be able to get Coordiantes and other information to build our data base. I have to make an interfacing among AMOS-II and GE.

    AMOS-II is an OO-Database.

    Thanks
    Rashid Masud
    Uppsala Sweden

    ReplyDelete
  6. hi...great article...but i still can't understand it...can i have a slice of your code please...
    Thanks before, for your great post

    ReplyDelete
  7. great!

    I need a way to embed GE 3D Viewer in VB.nET

    is it possible?

    thanks

    ReplyDelete
  8. hello.. really a nice post...may i request for some software which could link my GIS with google earth as u have done... even i thnk my organization can bear some cost for it as well....please guide me if its possible...superb work

    ReplyDelete
  9. Dear,

    can you please guide me, i am a student trying to learn how i can digitize directly on Google earth. please help me how to do this..

    thanks in anticipation

    ReplyDelete
  10. Hie i have read the comments above, these are pretty neat application areas.What i am trying to do is embed GE into a VBA form is this possible if so how? This is for the sake of presentations ETC. I am new to this whole programing thing and i am trying to find my feet, please help with directions and code.

    ReplyDelete