Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to overlay an ESRI shapefile on google maps?

What is the best way to overlay a shapefile in Google Maps?

After some reading suggests that, converting shapefile into KML and overlaying KML in Google map is an option. If that is the case, how do I convert a shapefile into KMLs?

I believe there would be a few open source tools available for this conversion. Can anyone point to a tool to covert a shapefile to KML without any loss of data?

like image 977
Carsen Avatar asked Mar 22 '11 05:03

Carsen


People also ask

Can you open a shapefile in Google Maps?

Under the Name tab, choose the field in the shapefile that you would like to use for the name labels for the data in Google Earth. You can use the preview table to view which field contains the content you would like to use for the labels.

How do I add an ArcGIS layer to Google Maps?

In ArcMap select File > ArcGIS Online and then in the search box type “google web map”. You should see your web map listed like mine: Click the “Open” link and you should see it in ArcMap!


1 Answers

I like using (open source and gui friendly) Quantum GIS to convert the shapefile to kml.

Google Maps API supports only a subset of the KML standard. One limitation is file size.

To reduce your file size, you can Quantum GIS's "simplify geometries" function. This "smooths" polygons.

Then you can select your layer and do a "save as kml" on it.

If you need to process a bunch of files, the process can be batched with Quantum GIS's ogr2ogr command from osgeo4w shell.

Finally, I recommend zipping your kml (with your favorite compression program) for reduced file size and saving it as kmz.

like image 167
Aaron Kreider Avatar answered Oct 04 '22 19:10

Aaron Kreider