OGR has limited support for KML writing and no support for reading KML. OGR generates KML 2.0. The KML driver has no coordinate system support at this time.
KML is mix of formatting and feature data. When writing KML, attributes are added to the output with the following HTML structure:
<b>Attribute name</b>: Attribute content
The OGR KML driver supports multiple layers of data. Each input layer is translated into a separate KML "Folder" element.
The following creation options are supported:
ogr2ogr -f KML output.kml input.shp -dsco NameField=RegionName
ogr2ogr -f KML output.kml PG:'host=myserver dbname=warmerda' -sql "SELECT pop_1994 from canada where province_name = 'Alberta'"