{"id":114,"date":"2013-03-17T20:18:39","date_gmt":"2013-03-18T01:18:39","guid":{"rendered":"http:\/\/homepages.uc.edu\/~yaozo\/wordpress\/?p=114"},"modified":"2013-03-17T20:18:39","modified_gmt":"2013-03-18T01:18:39","slug":"converting-shapefiles-and-kml-files","status":"publish","type":"post","link":"https:\/\/zhuoyao.net\/index.php\/2013\/03\/17\/converting-shapefiles-and-kml-files\/","title":{"rendered":"Converting shapefiles and KML files"},"content":{"rendered":"<p>Google Earth Pro is a slightly more advanced version than the free edition of the popular satellite imagery application (okay, it does way more, but many people just use that feature). One major additional feature it includes is the ability to import GIS shapefiles and display their features on top of the imagery, including terrain. It\u2019s useful to have your data as KML (Keyhole Markup Language) because KML (or KMZ) is easier to share and Google Earth standard edition is free. But then again, it\u2019s useful to have your KML files as shapefiles because proper GIS software is more powerful at\u00a0<em>analyzing<\/em>\u00a0data. Also, someone might ask you for your data in shapefile format (but they could easily follow these instructions).<\/p>\n<p>Good data management requires options. Options mean your data won\u2019t be locked into a proprietary format. Data want to be free! Read on for ways to convert your KML and shapefile data:<\/p>\n<p><strong>Converting KML files to shapefiles<\/strong><\/p>\n<p>Like Google Earth Pro,\u00c2\u00a0<a href=\"http:\/\/www.qgis.org\/\">Quantum GIS<\/a>\u00a0(QGIS) can convert KML or KMZ to shapefile, and best of all \u2013 it doesn\u2019t cost $400 per year (it\u2019s free!). QGIS is a cross-platform application meaning it will run on Windows, Mac OS X, and Linux.<\/p>\n<p>Use\u00a0<a href=\"http:\/\/www.qgis.org\/\">QGIS<\/a>\u00a0to convert a KML or KMZ file to shapefile:<\/p>\n<ol>\n<li>Click on Layer &gt; Add Vector Layer<\/li>\n<li>Find your KML or KMZ file.<\/li>\n<li>Right-click your new layer and click \u201cSave as shapefile.\u201d<\/li>\n<\/ol>\n<p>Zonums provides\u00a0<a href=\"http:\/\/www.zonums.com\/online\/kml2shp.php\">online conversion tools<\/a>. Or, use ArcGIS and\u00a0<a href=\"http:\/\/www.stevencanplan.com\/planning\/gis-and-mapping-tools\/\">this plugin<\/a>\u00a0to convert KML files to shapefiles.<\/p>\n<p><strong>Converting shapefiles to KML files<\/strong><\/p>\n<p>The freeware Shp2kml 2.o (Windows only) from Zonums will convert shapefiles to KML files. Want some free, interesting data to try it out?\u00c2\u00a0<a href=\"http:\/\/www.stevevance.net\/planning\/find-urban-data\/\">Check my ever expanding repository<\/a>.<\/p>\n<p>ESRI\u2019s ArcGIS can\u00c2\u00a0<a href=\"http:\/\/www.stevencanplan.com\/planning\/gis-and-mapping-tools\/\">convert KML files to shapefiles using this plugin<\/a>\u00a0and then import the shapefile as a layer onto your map.<\/p>\n<p><strong>Creating KML files online<\/strong><\/p>\n<p>As\u00c2\u00a0<a href=\"http:\/\/www.stevevance.net\/planning\/2009\/02\/geocoding-in-quantum-gis\/\">I described in this post<\/a>,\u00c2\u00a0BatchGecode will generate a KML file for you by inputting a list of addresses and names. Additionally, Google Earth (part of the\u00a0<a href=\"http:\/\/www.stevevance.net\/planning\/2009\/10\/google-maps-and-earth-is-the-poor-mans-gis\/\">rising Google GIS platform<\/a>) creates KML files. Google\u2019s My Maps feature also allows you to generate KML files (for sharing or download) by clicking and drawing points and lines on a map and inviting you to describe the features you create. Use this to get a map of your church congregation, or a map of people who voted for your candidate.<\/p>\n<p><a href=\"http:\/\/finder.geocommons.com\/\">GeoCommons Finder<\/a>\u00a0lets you upload geodata in many formats, save it to your profile, and then download it into multiple formats. You can upload a shapefile (.shp) and its accompany files (shx, dbf, and prj), verify that it read your data correctly,<\/p>\n<p><strong>More choices for converting<\/strong><\/p>\n<p>Additional software with conversion capabilities:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.mapwindow.org\/\">MapWindow<\/a>\u00a0(another free software choice; Windows only) \u2013 An alternative to QuantumGIS and ArcGIS.<\/li>\n<li><a href=\"http:\/\/www.expertgps.com\/convert-shapefile-to-kml.asp\">ExpertGPS<\/a>\u00a0(Windows only, not free) \u2013 Ideal for GPS device owners, or for researchers using GPS devices in projects. But it can convert the GPS and shapefile data into KML, shapefiles, or a spreadsheet, amongst other functions.<\/li>\n<li>Zonums, creator of the standalone Shp2kml software converter, now\u00c2\u00a0<a href=\"http:\/\/www.zonums.com\/online\/kml2shp.php\">offers many online tools for KML users<\/a>, including one that reverses the conversion and exports shapefiles from KML files. I found the link on\u00c2\u00a0<a href=\"http:\/\/freegeographytools.com\/2009\/online-kml-to-shapefile-converter\">FreeGeographyTools.com<\/a>.<\/li>\n<li><a href=\"http:\/\/opengeo.org\/\">OpenGeo Suite<\/a>\u00a0\u2013 Commercial software with non-profit licenses.<\/li>\n<li><a href=\"http:\/\/udig.refractions.net\/\">uDig<\/a>\u00a0\u2013 Free GIS software, but\u00a0<a href=\"http:\/\/www.stevencanplan.com\/planning\/trying-out-new-gis-software\/\">I haven\u2019t had good experiences<\/a>\u00a0with it on my computers.<\/li>\n<\/ul>\n<p><a href=\"http:\/\/spatialnews.geocomm.com\/articles\/overviewofkmlconversionprograms\/\">GeoCommunity has a good article<\/a>, with screenshots, on how some of these programs work.<\/p>\n<p>Need to work with\u00a0<a href=\"http:\/\/www.stevencanplan.com\/planning\/how-to-convert-gtfs-to-shapefiles-and-kml\/\">General Transit Feed Spec (GTFS) data<\/a>?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Earth Pro is a slightly more advanced version than the free edition of the popular satellite imagery application (okay, it does way more, but&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-114","post","type-post","status-publish","format-standard","hentry","category-geo-processing"],"_links":{"self":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":0,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"wp:attachment":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}