I am trying to convert a KML file to Shapefile using GDAL (ogr2ogr).
Regular KML files convert fine but KML files containing MultiGeometry features (eg: Geometry containing both Point and Polygon) do not get transformed.
The output is simply a blank shapefile containing no shapes or attributes.
I have tried this command:
ogr2ogr -overwrite -f "ESRI Shapefile" -where OGR_GEOMETRY='MultiGeometry' <ouputfolder> <input kml>
For an example, KML file which has MultiGeometry, you can see the us_states.kml hosted by Google.
Other info: I am using 'GDAL 1.10.1, released 2013/08/26' for windows.
Best Answer
Shapefiles don't support MultiGeometry or GeometryCollections, but
ogr2ogr
can explode them: