Posts

Showing posts from January, 2018

Extract KML data

 KML is a really common format, it is not usually one that GIS professionals use for a number of reasons but it is really handy for passing GIS data to online mapping systems, portable devices and it can even be created with a text editor.  If you want more information on it then the wiki page on Keyhole Markup Language (yes, that is the actual name) and Google Developers KML page are good places to start. Using KML with QGIS is super simple however there are a few tricks, particularly with KMZ files .  Here is a brief tutorial on opening KML files in QGIS. So getting them into QGIS is fine but sometimes I need to use the data within a KML file and QGIS doesn't deal with that very well as all the descriptive fields are groups in an HTML table in a single field.  While I'm sure it is possible to parse this in QGIS, here is a script in R since that was where I needed the data anyway. Save the KML file as a .csv file Open the file in R with read.csv