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.