Converting between KML and shapefile (SHP) format?
Using the open source
ogr2ogr -f 'ESRI Shapefile' output.shp input.kml
As noted in grego's comment below, you may need to use double quotes instead of single quotes for the output format option (e.g. "ESRI Shapefile" for the Windows command line). See also the gdal wiki.
...and just to preempt next natural question, it works the other way too: ogr2ogr -f KML output.kml input.shp
If you prefer to use GUI based tools, QGIS can act as a front end for ogr2ogr.
@mattwilkie I think he meant something like Zamzar.com. An online conversion service.
In my OSGEO Shell, simple quotes around 'ESRI Shapefile' don't seem to work, I had to replaced them by using double quotes: "ESRI Shapefile"
A couple of syntax points worth noting when using ogr2ogr (save yourselves hours of frustration): **1. For any of the option "tags" in your ogr2ogr string, make sure there's no spaces between the - and the word i.e. -progress NOT - progress)**
**2. Typing ogr2ogr -help (hit enter) shows you all the possible options.** It's important to use these option "tags" in the correct sequence i.e. -progress -f NOT -f -progress) (Here's what ogr2ogr -help prints out): Usage: ogr2ogr [--help-general] [-skipfailures] [-append] [-update] [-select field_list] [-where restricted_where|@filename] [-progress] [-sql |@filename] [-dialect dialect] [-preserve_fid] [-fid FID] etc. etc.
**3. The format is the only part of the string that should have quotes around it.** (Either single quotes or double quotes, depending what environment you're running ogr2ogr in: for me, in the QGIS > OSGeo4W shell, I use double quotes i.e. "KML" not 'KML' **4. You can get the full format list (90 different formats) by typing in:** ogr2ogr --formats