Why convert GML to KML?
GML (Geography Markup Language) is an OGC standard introduced in 2000, used by national mapping agencies and GIS data-exchange systems. KML (Keyhole Markup Language, adopted as an OGC standard in 2008) is the visualization format read by Google Earth and Google Maps. Converting to .kml lets you open official GIS datasets in Google Earth or share maps with users who have no GIS software.
How to convert GML to KML
QGIS OPEN-SOURCE
Add the .gml as a vector layer (Layer > Add Layer > Add Vector Layer), right-click the layer, choose Export > Save Features As, set format to KML, and click OK. QGIS reprojects to WGS 84 automatically.
FME Form APP
Create a workspace with a GML Reader and a KML Writer, then run it. FME handles CRS reprojection and attribute mapping automatically.
Programs that convert GML
About these formats
A .gml file is a Geography Markup Language file - an XML format defined by the Open Geospatial Consortium (OGC) for storing map and GIS data such as points, lines, polygons, and coordinate…
Open .GML details →A KML file stores map data - pins, routes, polygons, image overlays - in plain XML format. The easiest way to open one is Google Earth (free desktop app or earth.google.com in a browser) or…
Open .KML details →Quality & what to watch
- KML requires WGS 84 coordinates (EPSG:4326); if the GML uses a national grid or projected CRS, ogr2ogr and QGIS reproject automatically when you specify the target CRS.
- GML supports complex nested attribute schemas; KML's extended data model is simpler - nested or typed attributes are flattened on conversion.
- Large GML files produce large KML files that load slowly in Google Earth; consider converting to KMZ (compressed KML) afterward using QGIS or ogr2ogr.
Frequently asked questions
Do I need to install GDAL separately to use ogr2ogr?
Why does my converted KML appear in the wrong location in Google Earth?
-t_srs EPSG:4326 to the ogr2ogr command to reproject correctly.