blankblank blank


Archive for the 'Google' Category

Convert A Shapefile Into A Google Fusion Table

Google Fusion Tables is a free service from Google that lets you visualize, map, analyze and combine data. Standard data formats for import are spreadsheet data (including direct export from Google Docs), CSV and KML files. But you can use the Shape to Fusion website to convert shapefile data directly into Fusion Table format, including not just points but also lines and areas. Note: You will need to have a Google account, and will also need to give the Shape to Fusion website permission to access your Google account to upload the data.

The first thing you’ll need to do is prepare a zipped file for upload that contains the .shp, .shx and .dbf files associated with the shapefile; you’ll also need to include a .prj file that specifies the coordinate system used by the shapefile. You’re limited to 200 MB in total uploaded data, and a maximum of 200,000 rows of data. For line and area shapefiles, you have the option of simplifying the geometry to reduce the total row count; you can also create a centroid point for areas.

Depending on the size of the file, it can take a while to process; this sample file of mines in Arizona with 10,512 rows took about 10 minutes. A regularly-refreshed text page will show you the status:

mine_status

Once completed, you can directly access the Fusion Table data through the link at the bottom, or go to your Fusion Table data list and select the dataset; you can then analyze/visualize the data any way you choose, including maps. If you specify the data as public, you can embed it into a website. Here’s the active embedded map of Arizona mines used as sample data above; click on a point to get a pop-up with the name and products of the mine:

Note: Doesn’t seem to display properly in my copy of Internet Explorer 9; works fine in Chrome and Firefox.

Data can also be exported back out again in spreadsheet format, as a static KML file, or as a dynamic KML link that updates if the data changes.

Note: The source code for this app is available at this Google Code page.