Saturday, December 09, 2006

Labeling KML Part 2

I wrote previously on how Shape2Earth can now create center-points from polygons that can be used for labeling. The next thing I need to do is create the same functionality for lines. This is a bit trickier than for polygons. Imagine using the bounding envelope for the Missouri River to create a center-point to label the River. Its just not going to be in a very effective place.

The idea I am going to take a crack at is to use one of the points in the feature itself. I'll probably just pick the middle point and use that as the label. This should get the label reasonably close, and then let users make minor adjustments to its location in Google Earth.

Thursday, December 07, 2006

New Google Earth API Allows for GIS Type Interaction

I am not sure that this is what the Google Earth engineers had in mind when they released it, but new COM API exposes a method called “GetPointOnTerrainFromScreenCoords”.

If you pass this method normalized screen coordinates from the GE Render window, it will return the Latitude, Longitude, and elevation of that point in Google Earth. This opens up an enormous amount of potential for using Google Earth as your GIS interface.

Google has always maintained that they are not a GIS, and they are right. But they have a great visualization system. All that is needed is a way to interact with their interface in a way that makes sense for GIS types of applications. All of the GIS activity can than go on behind the scene.

As an example, I can now click anywhere on Google Earth and capture the coordinates. I can also drag a rectangle across the screen and define its actual location within GE. I can then pass this data back to GIS representation (such as a shapefile) of the loaded KML data. The result is a color coded selection set of data, or a new window that holds whatever feature data I would like to see from another server (or local data).

I can also use the coordinate to calculate a buffer that is loaded in as KML. I can also use this data to select other data.
You can also create very quick sketches directly in Google Earth that can be saved as shapefiles, or sent out to other clients for collaboration. Much more to come on this.

GIS for Google Earth: Final Testing

[Note: Final testing for Shape2Earth is complete. Shape2Earth Version 1.0 is has been released as shareware, and is available for download at]

The final beta version of Shape2Earth is ready for testing. I am particularly interested in international users, as I have had some issues with coordinates being written without decimals, and I want to make sure that is working.

This version also has a licensing manager built in to it. It will operate in full mode for 7 days, but then must be licensed.

Beta testers will receive the license to extend the use of the software until the final release.

Any interested persons may contact me at

Labeling GIS Data with Shape2Earth

One of the most requested functional additions for Shape2Earth has been the ability to label polygons. This is now possible with the use of a centroid function that creates a point in the middle of the polygon for the label.

In the example below, I will be labeling major lakes in the United States.

First, I open up Shape2Earth from MapWindow GIS

Then, from the Properties tab, I select the points that I want to use for the labels using the Enhanced Point Selector dialog box.

If I want there to be only text, I make the size of the icon zero, and do not add a label rollover. If I want to make it a bit fancier, I can select one point for the label, and another that is displayed when the user rolls over it.

Finally, I can select which attribute field I want to use to label each polygon. I can also select to sort the features so that they will be displayed in alphabetical order.

A simple result is show below.

These methods can be used to make some rather sophisticated views in Google Earth

Tuesday, December 05, 2006

Personal Geodatabase Feature Classes in Shape2Earth

Another interesting thing that I have been poking around at for some time is the ability to read ESRI Access Personal Geodatabases directly from their binary representation without the need for ArcObjects. The trickiest part of this was having to interpolate curves. I have this working to a reasonable degree.

The current prototype exports PGDB feature classes to KML, Shapefiles, and into SQL for importing GIS data into PostGIS, and has been tested with PGDBs created with ArcGIS 9.1 and 9.2. This opens more data for use with Shape2Earth.

I have been assuming that the same binary structure used in Access databases are also used by ArcSDE, but have not had the chance to test this theory out.

This same method could be used to create and edit Personal Geodatabase (and ArcSDE for that matter), but I doubt I’ll ever have the time to see this through.

Monday, October 30, 2006

Shape2Earth Beta 3

Shape2Earth Beta 3 input provided an enormous amount of help in the finalization of Shape2Earth. Shape2Earth Version 1.0 is now available for download at]

I have recently been able to start work on Shape2Earth Beta 3. Work so far has focused on a couple of fixes and enhancements or adjustments to current functionality.

I am cleaning up the 3D section and adding the ability to use Z values. Clamping features to the Earth will happen automatically if there are no height values (greater than zero) for all of the points in the feature.

Shape2Earth has better handling for zero geometries, which are very common in data that is typically derived from CADD. Previously, if there were any features with zero geometry, the resulting kml document would be blank of any data.

I would like for Shape2Earth to be able to handle the sorting of features based on an attribute to be a bit more user friendly. It currently requires the user to set three different values in three different areas to work. This will be consolidated into a single area.

I will probably build a separate form that can be used to better control the symbology of the features. Users will have an easier time selecting point symbols, and will have greater control over setting the colors for lines and polygons.

I have added a centroid function that creates a ‘center-point’ for polygons. This can be used for labeling.

I am adding better instructions on how to make sure that the shapefile is projected properly.

Users will also be able to only export a subset of the features in the feature class (such as only those in the current view, or those that have been selected).

Users will be able to export the view as a PNG overlay image.

I am also doing some experimenting with collada models. In some cases, lifelike models can be used to represent the features from the shapefile. This can be used in conjunction with the new features found in KML 2.1 to display features at different distances as different symbols (a generic circle at a great distance would be displayed as a model when the user gets close enough to see the model appropriately).

Thursday, July 06, 2006

Shape2Earth Instructions

Shape2Earth is a quick and easy way to convert GIS files into Keyhole Markup Language for viewing in Google Earth.

Instructions on how to use Shape2Earth Version 1.0 have been posted at this Shape2Earth Users Blog.

Monday, June 26, 2006

Advanced Touring in Google Earth

Way back when I first started investigating using Google Earth as a near real-time visualization client for a GIS, I stumbled upon GE’s very small API. For those of you not familiar with the term, an API is the Application Programming Interface for an application. It provides programmatic control to certain parts of the program.

The API for Google Earth is very small and experimental. The GE engineers did not make it publicly known, and do not support it (I am somewhat inclined to believe that that might change in the future). One of the things you can do is tell GE where to move to and how fast to move there. You can also tell it to load a kml file. I used these two very simple commands to create long running tours. You can really make some neat things happen when you have GE slowly spiral in and then quickly change directions. Coupling this with the dynamic loading and unloading of data makes for some really powerful visual presentations. These original tours were hard coded, and were begging for some automation.

To create the tours, I had built a small application that would capture the Latitude, Longitude, Range, Tilt, and Azimuth of my current view in GE. I could then paste the data into my move function in the Tour applications.

Over time, I have changed things quite a bit so that I can persist the views in XML. I can also set the movement speed and movement hold time using the user interface to get better movement effects, and then jump back and forth between each view to see how the overall movement looks.

I have also written a little utility so that you can export the tour as point placemarks in Google Earth. These placemarks keep the name and description information (viewed in the information balloon), and lets the application act as a very quick way to set placemarks defining features found in GE.

Once a tour has been made, it can be saved as XML and used by others (assuming they have the same program). Eventually, I should be able to set it up so that people can quickly create their own fly-throughs and data loading sequences to demonstrate and or brief.

Some examples of how this can be used is as an education briefing (fly around to different geological areas of interest and load data to both highlight the area display text to describe it), operational briefings (Air Force pilots can be taken through a mission with data popping into view and described as required), engineering (this has already been used to tour through large scale engineering, construction, and logistics phases).

The uses are nearly endless.

Sunday, June 18, 2006

Google Earth -- World Wind -- ArcExplorer

I was recently at an Air Force conference where Google Earth, NASA’s World Wind, and ESRI’s ArcExplorer where prominently displayed. The serious interest that organizations like the Air Force are putting into these platforms has given me the opportunity to explore each of these platforms a bit more in depth.

I am still using Google Earth a great deal. I don’t believe that it can currently be challenged in its ease of use and clean navigation. My 5 year old loves to play with Google Earth, and has no trouble getting around the planet to points of interest. Their KML data representation and the use of Network links to serve data offer a very interesting and open way to create very unique customizations. For organizations with a very large amount of data, it is tough to beat their server products. This would work very well for the Air Force, which could leverage their own imagery holdings with other services and NGA to create their own world for Air Force specific applications and visualizations.

Things I wish they would do …. Currently, Google Earth offers a couple of methods to integrate existing GIS data into their system. You can load KML files, or you can purchase their Fusion product that compiles your data into a format that can be hosted by their Earth Server product into a Google Earth Enterprise Client (the Google Earth Browser with extended features). You have two options with the Earth Server. You can either have a hybrid system in which you load your vector data into the Earth Server and view it against the Keyhole server imagery. Or you can get Enterprise Pro, and host ALL of the data in your own world.

The whole Google Earth product line is really an enterprise system. It works best when everything is put together. I would like to see what I would term an organizational level system (as opposed to enterprise). An example would be using a Windows 2003 Server to host organizational data (to include imagery) that can be securely fused with the larger Keyhole imagery server. The great majority of organizations don’t want to just load their vector data in the big Linux based Google Earth Server in a hybrid mode, or be responsible for populating an entire world if they have localized imagery. They want to view their holdings fused against the Google data.

Secondly, if the Google Earth Client could expose some additional capabilities to developers in their API, the GIS community could rapidly start tacking on some pretty sophisticated geoprocessing capabilities.

I finally got around to downloading the World Wind source code, and started investigating their method for creating Plugins. I have seen World Wind improve quite a bit over the last year. And believe that it will continue to get better. Its unique power in this game is that it is open source and license free. They automatically provide the ability to completely customize the user interface and provide the ability for any developer to integrate any type of GIS data. I am currently working on an extension that uses Yahoos geocoding service to search for locations and zoom to them in WW.

I have only seen ESRI’s ArcExplorer in Beta. I will withhold my comments on it until it is released. It will probably work very well for anyone who already has an investment in an ESRI based system. I am looking forward to doing some development work with it before the end of the year.

Thursday, June 01, 2006

Download Shape2Earth Beta 2

UPDATE: Shape2Earth Beta 2 testing has closed. Shape2Earth Version 1.0 hase been released as shareware, and is available for download below.

Sunday, May 14, 2006

Shape2Earth Beta 2 Testing

[Note: Shape2Earth Version 1.0 has been released as shareware and is available for downloading and evaluating at The evaluation period described below has resulted in dramatic enhancements to Shape2Earth.]

A couple of people have taken the time to look at and test Shape2Earth Beta 2. The Beta 2 application has a number of enhancements over the initial test release. There are a couple of consistent requests between the two releases that I will begin to work on shortly.

While feedback has been very positive overall, a couple of issues I have received so far deal with the install package and shapefiles behaving badly. I’ll need to implement a better error handling system so that people will know if the problem is with the shapefile or with Shape2Earth.

Wider use has helped to weed out issues. With that in mind, I would like to invite anyone who is interested in testing Shape2Earth Beta 2 to please send a request to me at

For those interested, I would recommend downloading and installing MapWindow GIS before requesting to test Shape2Earth Beta 2.

As I compile feedback and start adding improvements for Beta 3, I will start to send out a more format questionnaire to beta testing participants.

Monday, April 17, 2006

Shape2Earth Beta 2

[NOTE: Shape2Earth Version 1.0 has been released for download at]

There are a number of nice enhancements added to Shape2Earth for the Beta 2 release.

Optimized Speed
Shape2Earth has been optimized and is much faster when writing KML.

Query Attribute Data
Users can query GIS attribute data using keyword inputs, can sort fields, and can zoom to selected features in Google Earth. This is very helpful for large datasets, and for polygons that are not selectable in Google Earth.

On-The-Fly Reprojecting
Users no longer have to reproject their data to WGS84 before converting. Shape2Earth can now re-project on the fly from the original projection to Google Earth’s projection.

Enhanced Point Options
Users have a better selection on which graphics to use to represent point features. They also have the option of changing the size and color of a point when the mouse hovers over it in Google Earth. Similarly, users can set up the KML so that the attribute used to name the feature is only visible when the point is hovered over (see below).

Improved Interface
The Shape2Earth interface has been compacted, with tools being moved from the Form to a toolbar on the top. This helps when people want to interact with Shape2Earth and Google Earth at the same time. The ability to keep the Shape2Earth Form on top of Google Earth all of the time has been added to the options menu.

Saturday, April 01, 2006

Querying GIS Data in Google Earth

Feedback has been coming in from people who have been kind enough to test Shape2Earth Beta 1. So far, I have been quite pleased with the results. There do not appear to be any major glitches. I'm still open for more people to try it out if they would like.

Someone pointed out that it would be nice to be able to alphabetically sort the features in KML so that people could more easily find them in Google Earth. This is a great idea, and I’ll be looking into a sorting method soon. In the meantime, I started investigating how to query the data in a manner similar to the way that we query GIS data. The basic idea is to query and/or sort features in Shape2Earth using their attributes, and then zoom to their location in Google Earth.

To do this, I have added an additional tab to the Shape2Earth form. It loads all of the attribute data of the shapefile into a data grid. Data is only loaded when requested in order to optimize performance for users who only want to convert data to KML.

Once selected, all of the attributes are loaded into the table. In this example, I have already loaded a shapefile of world volcanoes into Google Earth as a KML network link. Each feature in the table of contents in Google Earth has the name of the volcano, but they are not in alphabetical order.

With the attribute data from the KMLs companion shapefile loaded into Shape2Earth, I have a couple of options for finding a particular feature. I can sort the table based on any of the fields (see below) and then manually select the feature in the table that I would like to zoom to in Google Earth.

I can also search for attributes using a text field to enter values. I can look for specific values, or use a 'like' clause to match close values. In this example, I have entered 'helens' to query for Mount Saint Helens. I have one record that matches this query, and I can view it by itself by clicking 'View Selected'.

I can return to the rest of the table by clicking "Shop All". To zoom to my selected feature, I simple click on "Zoom to Selected", and then watch as Google Earth gracefully zooms to the item I have selected.

To make this querying capability as fluid and useful as possible, I have added an option that allows for Shape2Earth to always sit on top of Google Earth. This provides the ability to really smoothly navigate through Google Earth usinattributeribute data.

So far, it has worked fantastically for points and polygons the size of buildings. I'll have to add some geometric functions for it to work appropriately for large polygons. GE does not let you set the MapView coordinates that way that a typical GIS does. So I will need to mimic this using a center-point and distance.

Friday, March 24, 2006

Importing Shapefiles into Google Earth

[Note: The methods described below can now be done entirely within Google Earth. Refer to Using Google Earth as a GIS form more information. For translating shapefiles to KML, Shape2Earth Version 1.0 has been released as shareware.]

The image (show above) of Keyhole Markup Language (KML) data in Google Earth was created entirely with shapefiles and GIS software that is freely available over the Internet. OpenJUMP was used to create the buffer around a school. MapWindow GIS was used to apply the symbology. Shape2Earth (which works as a plug-in for MapWindow) was used to convert the shapefile to KML, which was then loaded in Google Earth for visualization.

Above: OpenJUMP (open source GIS written in Java) is used to create a buffer around the selected building.

Above: The buildings and buffer shapefile are loaded into MapWindow GIS (open source GIS written in .NET). Symbology is applied, and Shape2Earth is used to convert the shapefile and symbology into KML.

Now that Shape2Earth is in beta testing, I have had the opportunity to get some great feedback on its functionality, and have seen some REALLY cool KMLs created by a number of people througout the world.

Saturday, March 18, 2006

Shape2Earth Beta Nearing Release

I think that the Shape2Earth shapefile to KML coverter for Google Earth is just about ready to be released to a number of beta testing volunteers. I was debating whether or not I should spend some additional time optimizing certian sections of code. I'm leaning more towards just getting it out there. I'm not going to worry so much about making it able to run just a little bit faster. There is more than enough functionality available now to make it well worth looking at. I 'm really excited about getting feed back to see what I should focus on next.

Thursday, March 16, 2006

Shape2Earth GIS Attributes

I decided to let Shape2Earth write GIS attribute data into the KML files for viewing in Google Earth. It actually did not take that long to write the code for this. I am letting the user decide which attributes they want to write, and then extract the data from the shapefile and write them into html for viewing in the description balloon. They also get to select which field will be used for the feature name.

This should keep Shape2Earth more in line with the capability offered by Google Earth's GIS import module. I'll be sending the first Shape2Earth Beta to a number of volunteers within the week.

Saturday, March 11, 2006

Shape2Earth Beta Testing

[NOTE: Since this post was first published, Shape2Earth Version 1.0 has been released as Shareware.]

I spent part of the day looking to see what kind of free shapefiles are out there for use with my newly dubbed Shape2Earth open source GIS shapefile to KML converter. The simple answer is that there are "tons". I played around quite a bit trying to poke holes in Shape2Earth. Things seem pretty stable at this point, but I want to get it out to more people to see what breaks.

Below are a couple of quick maps I made with downloaded shapefiles.

Building footprints, Carrboro, North Carolina.
Average size of farms in Iowa by county .
Migration of Africanized Honey Bees in US by county.
Building footprints, Austin, Texas.

Tuesday, March 07, 2006

Exploring GIS Data in Google Earth

[Note: Shape2Earth is now available for Download]

Last week I wrote about the work I was doing with open source GIS to create a shapefile to KML converter that took advantage of the editing and symbolism that was offered through MapWindow GIS (Shapefile to KML using Open Source GIS). I thought I would follow up with a couple of other interesting things you can do with this application. In particular, I thought I would show some ways that you can explore GIS attribute data using the reload capability.

I'll start off with a shapefile of the USA that I downloaded off of the internet.

This shapefile has a lot of attribute data associated with it. Opening the attribute table (below) shows all of the different data that is available for each state.

After I have explored the different attribute data that I can use for my map, I open the Export Shapefile to KML application within MapWindow GIS. I am going to use some of the attribute information to act as the height for each of the state features. This will, in effect, turn my map of the USA in Google Earth into a chart. Below, I have selected HOUSEHOLDS as the value I am going to use as my height source

Once I have done this, I will select the Load As Link button on my form. As you may recall from my previous description of this application, this button creates a Google Earth Network Link that references the data KML that represents the actual map data. This will allow me to reload the data again after I have made any changes. Below is the result of this KML conversion.

Next, I decide that I want to see the states listed by number of mobile homes. All I have to do is bring back up the Export Shapefile to KML form, select MOBILEHOME as the height attribute, and click on the Reload Link button. This will rewrite the KML and reload it into Google Earth automatically (see below).

I can also use the attributes the modify the color scheme using MapWindow GIS. Below, I have given each state a unique color value.

I can then go back to my Export Shapefile to KML form and hit Reload Link. Below, I have selected NO_FARMS87 as my height value before reloading the KML into Google Earth.

Finally, I can put it all together. Before making the map below, I set the colors in MapWindow GIS to be a continuous ramp from red to yellow using UNITS50_UP as the attribute value. I then used the same attribute field for my height.

These are just some simple examples of being able to modify and load shapefiles into Google Earth using open source GIS and my shapefile to KML conversion tool.

Tuesday, February 28, 2006

Shapefile to KML using Open Source GIS

[Note: The work described below has resulted in an application named Shape2Earth, which is now available for download.]

One of the things that I have been working on lately (or .. whenever I get the chance) is a Shapefile to KML writer for viewing GIS data in Google Earth that uses open source GIS components. I gained a lot of experience with KML while prototyping an ESRI ArcMap based toolset that used ArcObjects, and thought that an open source equivalent would be worth pursuing.

There were three main reasons that I decided to work on this project. 1) It sounded like a lot of fun, 2) I have been increasingly interested in open source GIS, and 3) the emergence of Google Earth (as well as Google Maps, Yahoo Maps, and Microsoft Live Local) has led to an enormous interest in geospatial visualization outside of the traditional GIS community. There is a massive amount of GIS data available to the public in the form of shapefiles, and a cheap, license free, toolset to get the data into Google Earth might be useful to a lot of people. I also really like the idea of having my own, royalty free, toolset for creating Google Earth based applications.

There are several good open source GIS packages available today, and while none of them come close to matching a professional GIS, quite a few of them are powerful enough to be useful. My personal favorites are OpenJUMP, Quantum GIS (QGIS), and MapWindow GIS. As you might expect, each of these has their strong and weak points. In fact, I have found that if you are willing to jump back and forth between each of them, you can do an enormous amount of serious GIS work.

To develop my Shapefile to KML tool, I decided to use MapWindow GIS. The main reason for choosing this open source GIS was it’s development environment (.NET), the ease with which it was possible to create plugins, and its re-projecting capability (very important if you want to get all of your shapefiles into Google Earths projection system). MapWindow GIS also lets users make shapefiles from scratch pretty quickly, though its editing tools are not as robust as OpenJump or QGIS (which I have often used for editing shapefiles to be converted in MapWindow GIS).

To get an idea of the status of this open source KML initiative (I will certainly have to come up with a better name than that), I thought I would walk through a typical scenario of taking a shapefile off of the internet and placing it in Google Earth.

I’ll start at a web page for accessing GIS data for Austin, Texas (and the regional area) and downloading a shapefile representing School Districts. This shapefile has no projection information, but MapWindow GIS allows us to assign a projection to the shapefile.

In this case, the web site points out that “All data sets are projected into the Texas State Plane Central NAD 83 survey feet coordinate system unless otherwise stated.” So we enter this in the “Choose Projection” form in MapWindow GIS.

We have one more step to go, however, as Google Earth has its own projection System. Now that the shapefile knows what its projection system is, it can convert to WGS84 to be compatible with Google Earth using MapWindow GIS’s “Reproject a Shapefile” tool.

The way that MapWindow GIS handles re-projecting data is to create a new shapefile and write it to the same directory as the shapefile that is being re-projected. The new shapefile has the same name with “_Reprojected” tacked on the end (so, in this case, the school district shapefile I downloaded named “schldist” is re-projected to a new shapefile named “schldist_Reprojected”).

Now that my data is in the proper projection, I can go ahead and add it to Google Earth using MapWindow GIS.

Once the data is in MapWindow GIS, I can make whatever symbolic changes I might want by accessing the layer properties. MapWindow GIS offers the basic coloring schemes that you would find in a typical GIS, such as coloring features by attribute. Once I find a color I am happy with, I can access the Shapefile2KML tool from the menu bar.
At this point in development, I have some pretty basic KML parameter options I can set. The Layer Name is the name that is visible in the table of contents in Google Earth, and the Layer Opacity determines to what degree you can see through the layer. There are currently two ways to determine a height value for each feature. Either a common number can be set that is applied to all features, or a numeric attibute field can be used. The color for each feature is determined by the symbology used in MapWindow GIS.

Once the parameters have been set, I can convert the data to KML. I have a couple of options here as well. I can simply save the KML to the hard drive, or I can save it and have it be automatically loaded into Google Earth. If I want to play around with the data a bit to see how it looks in Google Earth, I can select "Load As Link". This writes and loads a Network Link into Google Earth that references, and therefore, loads the data KML file that was saved on your hard drive. The interesting thing about using this method is that opening a Network Link in Google Earth has a different behaviour than opening a regular KML file. This requires a brief explanation.

If you were to write a function that loads a KML file, and hit it 10 times, it would load that same file 10 time. If you do the same thing with a Network Link, however, it will not load that same file 10 times. Each time you hit the button, the Network Link is reloaded. That means that if you rewrite the Network Link to point to a different KML file before loading it, you would remove the KML data that is currently visible in Google Earth, and replace it with the new KML data.

What this means to us in this case, is that we can keep modifying our shapefile symbology in MapWindow GIS and keep reloading it in Google Earth by selecting the "Reload Link" button. I have found this to be quite handy, and will describe its functionality more later on.

For our demonstration here, I select the "Save and Load" button. After the KML file is written, a dialog box opens to ask me where it should be saved. After I select a location on my hard drive, the KML file is save and then automatically loaded into Google Earth.

This is neat for data that already exists, but I wanted to also take advantage of the creation and editing ability of MapWindow GIS (and other open source GIS systems as well). One way to do this is to find available imagery to digitize off of. I plan to look into using the web service offered by Microsofts TerraServer, but for my initial personal use, I used Google Earth's API to capture their view and write a world file to georeference it for use in GIS.

Currently, I can select "Get Image from GE" from MapWindow GIS (or access a stand-alone version from my desktop) which opens a simple dialog box. I can then zoom into the scene I want in Google Earth and select "Capture View" from the form. If the scenes tilt and orentiation to north are not correct for GIS, I am alerted that the scene needs to change to meet these criteria (which are required for proper alignment in GIS). If I select OK, the scene is automatically moved to zero tilt and zero degrees to north. Selecting "Capture View" again lets me save the view to my hard drive in the form of a jpeg file. Here, I have zoomed into the campus of the University of Northern Iowa and captured my view.

While the resolution of this image is not fantastic, it allows me to do some general sketching using the image as a background reference.

I can load the image into MapWindow GIS, create a brand new shapefile (in this case, a polygon), and start digitizing new polygon features on top of the image. Below, I have traced the outline of one of the buildings on the UNI campus.

I can also load the imagery into other GIS packages for editing. After saving my edited shapefile in MapWindow GIS, I have loaded the image and shapefile into QGIS (below). Once in QGIS, I added another feature and saved my edits.

After I am finished editing my new shapefile, I loaded it back into MapWindow GIS to convert it into KML. Below, I have set the color of the features to silver, set my KML parameters, and then click "Load As Link".

After the data KML is written, I am prompted to save the file to my hard drive. But because I used the "Load As Link" tool, a second file (the Network Link) is also saved. The Network Link KML has the same name as the data KML file with a "_link" added to it. This is the KML file that is actually loaded in Google Earth as soon as I save the file. When the Network Link is loaded into Google Earth, it automatically loads the data KML file that it references.

The interesting thing about this (as described above) is that I can rapidly make modifications to the shapefile and quickly re-load it into Google Earth. The graphics below demonstrate this. I can change the color and KML values, and simply hit "Reload Link" to replace the data into Google Earth

This is just a quick view on the current status of my open source GIS / Google Earth project. Later, I'll describe some additional feature I plan to implement.

Monday, February 27, 2006

Using Google Earth as an Emergency Response Viewer

[NOTE: The process of using Google Earth as an emergency response viewer, described below, can now be done entirely within Google Earth. Refer to Google Earth as a GIS for more details.]
One of the main reasons that I originally started working on an ESRI based extension to translate GIS data into KML for viewing in Google Earth (GE) was to test the viability of using GE as a spatial viewer during an emergency. By the time I was seriously in to my ArcObjects/KML toolset, GE had already been used for Hurricanes Katrina.

During an event (fire, accident, environmental, threat, attack, etc), those in charge need a picture of what is going on in order to make critical decisions. Examples of the kinds of information that they want to see is a cordon around the affected area, the ability to view impacted buildings and other assets, the location of traffic control points, and the location of their first responders (often using Automated Vehicle Location [AVL] technology).

I wanted to build a tool that would work with any ESRI ArcMap based tool. To do this, I built an XML based configuration wizard that is used to define what datasets listed in ArcMap’s table of contents are to be exported to KML on demand. The XML configuration file can also hold symbology information for each of the KML layers. While the ArcObjects extension can use the cartographic information from ArcMap to symbolize features, I have found that colors that work well in ArcMap do not always work as well in GE.

Whenever any data is modified (creation of a cordon, adjustments to a buildings status as people are evacuated), it can be instantly published to KML. The use of a configuration file allows a user to set it up for any ArcMap application. It simply exports all feature classes listed in the configuration file on demand. This allows any emergency response application based on ArcMap to use this tool.

My first test on the system used CH2M HILL’s iCIT emergency management application. As iCIT managed the application, the GE extension would publish the data for viewing in a command center in GE. The KML files were securely sent to the GE client machine using a secure Instant Messenger type of technology. Once the files were update on the client machine, a web service was used to reload the altered file in Google Earth.

iCIT Emergency Management System

GIS Data Dynamically Posted to Google Earth

Google Earth has proven to be an excellent, high level, visualization platform for people who need to make decisions. Most of my current testing has dealt with events that are limited in scope (view samples). I should be able to get my hands on a couple of other ArcMap based command and control application for testing. I would really love to see this type of capability used on a much larger scale to see how it might work.

I also have been working on the plumbing to be able to sit GE on top of a GIS package, and use it to create the datasets that have typically been generated by GIS software (buffers, unions, intersects, selection sets, etc.). I plan to look into using ArcEngine, ArcServer, and/or a combination of open source geospatial processing packages to create much of the functionality currently offered by GIS software using GE itself.

One item of recent interest from the Air Force is the use of the Commercial Joint Mapping Toolkit (C/JMTK) as the geoprocessing power behind GE.

I plan to follow up on this post with some work I have been involved with at the US Air Force Academy with automated vehicle location (AVL) and and unmanned aerial vehicles (UAVs) with streaming video into ArcMap and Google Earth.