The three previous posts in this series have examined completely free options for exporting shapefile data into Google Earth’s KML format. Each of those had advantages and disadvantages, with the biggest advantage for all being that they’re completely free.Today I’ll take a look at an option that isn’t free, but which at $29.99 I would classify as “cheap”, especially given its capabilities. And the free demo version lets you import up to 1000 features, enough to evaluate whether it meets your needs.
Shape2Earth differs from the three earlier options in that it’s not a stand-alone program, but works as a plug-in for MapWindow, a first-class free open source GIS editor for Windows. MapWindow lets you open shapefiles, or create your own, assign colors to shapes depending on attributes, and then exports that data to the shape2earth plug-in. In the example below, I’ve opened a shapefile that shows the mines in Arizona, and used MapWindow’s Legend Editor to assign colors to every mine position based on the principal commodity it produced. The resulting map looks like this:
With the shapefile layer you want to export selected, open Shape2Earth from the menu bar, and get the KML Tab:
If your shapefile layer does not have a .PRJ file associated with it to tell Shape2Earth what its coordinate system and datum is, it will prompt you to assign a projection to your shapefile. Shape2Earth will handle converting it automatically to Google Earth’s native coordinate system (WGS84, latitude/longitude). The window above will show you which layer you have selected, and the opacity/transparency with which it will be displayed in Google Earth, though you can always modify that directly in Google Earth as well. “Altitude Mode:” gives you three options:
- Clamped To Ground: Pins the KML data to ground level in Google Earth
- Relative To Ground: Extrudes the height of the data relative to the ground, using either an attribute value, an input value, or a Z altitude value if it’s present in the shapefile attribute data.
- Absolute: Extrudes the height of the data to an absolute value, which as above can be defined by an attribute value, input value or Z value.
Click on the Properties Tab:
Since this is a point shapefile, the Polygon Options are ghosted; for polygon shapefiles, the checkboxes allow you to specify whether the polygons are filled or not, and also whether to create a marked Centroid point for every polygon, when rolled over, will have a pop-up balloon showing the exported attribute values. You will probably always check the “Use Map Colors” box, so that Shape2Earth will assign the colors from MapWindow to the data markers in the Google Earth file. You can also set the marker styles here, and create a label rollover, i.e. a balloon with the exported attribute data will pop up when you roll over the position marker.
GIS Data Tab:
Here you select which attribute to use for labeling every shape in the Google Earth Places pane by selecting from the “Feature Name Field:” dropdown. Checking the “Order By Feature Name” box makes the output be listed in the Places pane alphabetically or numerically based on the Feature Name Field. This is useful if you have a shapefile with lots of features, where it would be difficult to locate a specific feature if it were randomly listed in Google Earth. For example, the Arizona mines shapefile has 10,000 mines, and if the mines are listed randomly by name, it would be difficult to track down a specific name; I’d have to scroll down a list of 10,000 mine names. With the box checked, the mines will be ordered alphabetically by name in the Google Earth Places pane, making that specific mine name easier to track down.
This tab also displays a list of the shapefile attributes that can be included in the KML file, and you can select which attributes to include by checking the boxes.
In this tab, you can load and query the attribute table, show and zoom to the shapes selected by the query, and sort the attribute table data in ascending or descending order. As far as I can tell, this doesn’t affect which shapes will get exported to KML format, i.e. they all do.
This tab just shows the original coordinate projection and datum information of the shapefile. Regardless of the original projection, the final one of the KML file will be the right one for Google Earth.
Under the Options menu is one item: Check Winding Order. Google Earth expects all the vertices in a line or polygon shapefile to be in order, but that order can get mixed up by editing a shapefile to add vertices between other ones. If you know that’s the case, or if you’re having problems with a shapefile to KML conversion, try using this option. The View menu lets you set the Shape2Earth window so that it’s always on top.
Once everything is configured the way you want it, there are three Export choices, available from both the File menu and the three icons in the upper left:
- Save as KML/KMZ: Saves a KML/KMZ Google Earth file, but doesn’t open it, and closes Shape2Earth
- Export To GE: Saves a KML/KMZ Google Earth file, opens it in Google Earth, and closes Shape2Earth
- Load As Network Link: Saves a KML/KMZ Google Earth file, loads a network link to that file in Google Earth, and keeps Shape2Earth open. Using this option, you can change the coloring scheme in MapWindow and parameters in Shape2Earth, and every successive time you invoke “Load As Network Link”, the modified color scheme will show up in Google Earth. This is helpful in “tuning” the appearance of the exported shapefile data to make it look like you want in Google Earth.
Here’s a plot of Arizona mine data from Google Earth, with the marker colors representing the principal commodity produced at that mine:
Shape2Earth is superior in its capabilities to all the other options I’ve posted about in this series, and even though it’s not free, it’s a good deal at only $29.99. The demo mode lets you export up to 1000 features from a shapefile, and that will give you a good idea of whether it’s worth paying for. A users manual is available online.
Full disclosure: I was a beta tester of Shape2Earth, and received a free copy of the final version for my efforts.