<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: kml</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/kml.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2019-06-14T00:45:01+00:00</updated><author><name>Simon Willison</name></author><entry><title>Convert Locations.kml (pulled from an iPhone backup) to SQLite</title><link href="https://simonwillison.net/2019/Jun/14/locations-kml/#atom-tag" rel="alternate"/><published>2019-06-14T00:45:01+00:00</published><updated>2019-06-14T00:45:01+00:00</updated><id>https://simonwillison.net/2019/Jun/14/locations-kml/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://gist.github.com/simonw/2f09eb4b9fa41a3721f3e87f18813221"&gt;Convert Locations.kml (pulled from an iPhone backup) to SQLite&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
I’ve been playing around with data from my iPhone using the iPhone Backup Extractor app and one of the things it exports for you is a Locations.kml file full of location history data. I wrote a tiny script using Python’s ElementTree XMLPullParser to efficiently iterate through the Placemarks and yield them as dictionaries, which I then batch-inserted into sqlite-utils to create a SQLite database.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/kml"&gt;kml&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/projects"&gt;projects&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sqlite"&gt;sqlite&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/xml"&gt;xml&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sqlite-utils"&gt;sqlite-utils&lt;/a&gt;&lt;/p&gt;



</summary><category term="kml"/><category term="projects"/><category term="sqlite"/><category term="xml"/><category term="sqlite-utils"/></entry><entry><title>togeojson</title><link href="https://simonwillison.net/2019/Jan/18/togeojson/#atom-tag" rel="alternate"/><published>2019-01-18T23:50:00+00:00</published><updated>2019-01-18T23:50:00+00:00</updated><id>https://simonwillison.net/2019/Jan/18/togeojson/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/tmcw/togeojson"&gt;togeojson&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Handy JavaScript library and command-mine tool for converting KML and GPX to GeoJSON, by Tom MacWright

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://twitter.com/tmcw/status/1086407002773803008"&gt;@tmcw&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/geospatial"&gt;geospatial&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/kml"&gt;kml&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/geojson"&gt;geojson&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/tom-macwright"&gt;tom-macwright&lt;/a&gt;&lt;/p&gt;



</summary><category term="geospatial"/><category term="kml"/><category term="geojson"/><category term="tom-macwright"/></entry><entry><title>Google Maps Data API</title><link href="https://simonwillison.net/2009/May/20/mapdata/#atom-tag" rel="alternate"/><published>2009-05-20T21:07:10+00:00</published><updated>2009-05-20T21:07:10+00:00</updated><id>https://simonwillison.net/2009/May/20/mapdata/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://code.google.com/apis/maps/documentation/mapsdata/"&gt;Google Maps Data API&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
I’m disappointed by this one—it’s really just a CRUD store for the KML files used in Google MyMaps. It would be a lot more useful if it let you perform geospatial calculations against your stored map data using some kind of query API—a cloud service alternative to tools like PostGIS.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://googlegeodevelopers.blogspot.com/2009/05/introducing-google-maps-data-api-in.html"&gt;Google Geo Developers Blog&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/apis"&gt;apis&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gdata"&gt;gdata&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/geospatial"&gt;geospatial&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google-maps"&gt;google-maps&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google-maps-api"&gt;google-maps-api&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/googlemapsdataapi"&gt;googlemapsdataapi&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/kml"&gt;kml&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/postgis"&gt;postgis&lt;/a&gt;&lt;/p&gt;



</summary><category term="apis"/><category term="gdata"/><category term="geospatial"/><category term="google-maps"/><category term="google-maps-api"/><category term="googlemapsdataapi"/><category term="kml"/><category term="postgis"/></entry><entry><title>Data Scraping Wikipedia with Google Spreadsheets</title><link href="https://simonwillison.net/2008/Oct/16/data/#atom-tag" rel="alternate"/><published>2008-10-16T14:37:33+00:00</published><updated>2008-10-16T14:37:33+00:00</updated><id>https://simonwillison.net/2008/Oct/16/data/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://ouseful.wordpress.com/2008/10/14/data-scraping-wikipedia-with-google-spreadsheets/"&gt;Data Scraping Wikipedia with Google Spreadsheets&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
I hadn’t played with =importHTML in Google spreadsheets, which lets you suck in data from an HTML table or list somewhere on the web. This tutorial takes it further, bringing Wikipedia, Yahoo! Pipes and KML in to the mix.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/google-docs"&gt;google-docs&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/googlespreadsheet"&gt;googlespreadsheet&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/importhtml"&gt;importhtml&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/kml"&gt;kml&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mashups"&gt;mashups&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/scraping"&gt;scraping&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/wikipedia"&gt;wikipedia&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/yahoo-pipes"&gt;yahoo-pipes&lt;/a&gt;&lt;/p&gt;



</summary><category term="google-docs"/><category term="googlespreadsheet"/><category term="importhtml"/><category term="kml"/><category term="mashups"/><category term="scraping"/><category term="wikipedia"/><category term="yahoo-pipes"/></entry><entry><title>Flickr Developer Blog: API Responses as Feeds</title><link href="https://simonwillison.net/2008/Aug/25/flickr/#atom-tag" rel="alternate"/><published>2008-08-25T22:20:10+00:00</published><updated>2008-08-25T22:20:10+00:00</updated><id>https://simonwillison.net/2008/Aug/25/flickr/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://code.flickr.com/blog/2008/08/25/api-responses-as-feeds/"&gt;Flickr Developer Blog: API Responses as Feeds&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Flickr API calls that return a “standard photos response” (e.g. flickr.photos.search and flickr.favorites.getList) can now output eight different feed formats as well, including Atom, RSS flavours, geoatom, geordf and KML. Error codes are returned as X-FlickrErrCode HTTP headers.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://laughingmeme.org/2008/08/25/codeflickrcom-api-responses-as-feeds/"&gt;Kellan&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/apis"&gt;apis&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/atom"&gt;atom&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/feeds"&gt;feeds&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/flickr"&gt;flickr&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/geoatom"&gt;geoatom&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/geordf"&gt;geordf&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/http"&gt;http&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/kml"&gt;kml&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/rss"&gt;rss&lt;/a&gt;&lt;/p&gt;



</summary><category term="apis"/><category term="atom"/><category term="feeds"/><category term="flickr"/><category term="geoatom"/><category term="geordf"/><category term="http"/><category term="kml"/><category term="rss"/></entry><entry><title>KML: A new standard for sharing maps</title><link href="https://simonwillison.net/2008/Apr/14/kml/#atom-tag" rel="alternate"/><published>2008-04-14T18:36:39+00:00</published><updated>2008-04-14T18:36:39+00:00</updated><id>https://simonwillison.net/2008/Apr/14/kml/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://google-latlong.blogspot.com/2008/04/kml-new-standard-for-sharing-maps.html"&gt;KML: A new standard for sharing maps&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Google’s KML format, which is already supported by both Microsoft and Yahoo!’s map software, has been accepted under the wing of the Open Geospatial Consortium and is now an international standard.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/google"&gt;google&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google-maps"&gt;google-maps&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/kml"&gt;kml&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mapping"&gt;mapping&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/maps"&gt;maps&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ogc"&gt;ogc&lt;/a&gt;&lt;/p&gt;



</summary><category term="google"/><category term="google-maps"/><category term="kml"/><category term="mapping"/><category term="maps"/><category term="ogc"/></entry><entry><title>Brighton geek venues</title><link href="https://simonwillison.net/2007/Aug/16/brighton/#atom-tag" rel="alternate"/><published>2007-08-16T01:38:29+00:00</published><updated>2007-08-16T01:38:29+00:00</updated><id>https://simonwillison.net/2007/Aug/16/brighton/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://brighton.geekvenues.com/"&gt;Brighton geek venues&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Nat’s latest project: a neat Google Maps mashup listing venues for geek events in Brighton, managed using Google MyMaps to edit a KML file.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/brighton"&gt;brighton&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/geek"&gt;geek&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google"&gt;google&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google-maps"&gt;google-maps&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/googlemymaps"&gt;googlemymaps&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/kml"&gt;kml&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mashup"&gt;mashup&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mymaps"&gt;mymaps&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/natalie-downe"&gt;natalie-downe&lt;/a&gt;&lt;/p&gt;



</summary><category term="brighton"/><category term="geek"/><category term="google"/><category term="google-maps"/><category term="googlemymaps"/><category term="kml"/><category term="mashup"/><category term="mymaps"/><category term="natalie-downe"/></entry><entry><title>KML and GeoRSS support added to the Google Maps API</title><link href="https://simonwillison.net/2007/Mar/23/google/#atom-tag" rel="alternate"/><published>2007-03-23T01:03:33+00:00</published><updated>2007-03-23T01:03:33+00:00</updated><id>https://simonwillison.net/2007/Mar/23/google/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://googlemapsapi.blogspot.com/2007/03/kml-and-georss-support-added-to-google.html"&gt;KML and GeoRSS support added to the Google Maps API&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Since Flickr can output GeoRSS, this means you can now plot your Flickr photos on a Google Map (if you’re so inclined).


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/flickr"&gt;flickr&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/georss"&gt;georss&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google"&gt;google&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google-maps"&gt;google-maps&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/kml"&gt;kml&lt;/a&gt;&lt;/p&gt;



</summary><category term="flickr"/><category term="georss"/><category term="google"/><category term="google-maps"/><category term="kml"/></entry></feed>