Convert GML to KML
Convert GIS GML datasets to WGS 84 KML with QGIS, GDAL, or an online service.
Make KML files online
We can't read GML files yet, so this conversion isn't available. If you can export your work to one of these formats - or others - we'll turn it into KML:
Want to convert GML to KML?
Let us know. We pick the conversions to add next by how many people ask for them.
How to convert gml to kml file
- GPS navigation, maps, GIS
- No ratings yet.
A GIS dataset supplied as GML may need conversion before it can be opened in Google Earth, GPS software, or a mapping application that accepts KML. KML also provides a simpler file for sharing map features, while GML commonly depends on an application schema and related XML definitions.
What the GML format is
GML (Geography Markup Language) is an OGC and ISO XML-based format for geographic features, including points, lines, polygons, coordinates, names, and attributes. National mapping agencies, cadastral systems, surveying applications, web feature services, and GIS programs commonly use it. CityGML is a related, specialized application of GML for 3D city models.
GML is often governed by a separate XML application schema. A dataset may therefore reference namespaces, schemas, code lists, coordinate reference systems, and external resources that a basic converter cannot interpret without the complete dataset. One GML file can also contain multiple feature types or layers.
What the KML format is
KML (Keyhole Markup Language) is an XML format designed for geographic visualization in Google Earth, Google Earth Pro, and compatible mapping software. It supports placemarks, points, paths, polygons, folders, descriptions, ground overlays, icons, and limited styling. KMZ is the ZIP-compressed form of KML and can package images and other linked resources.
KML is convenient for sharing a finished map because many viewers open it directly. Its coordinates use the WGS 84 geographic reference system, normally expressed as longitude, latitude, and optional altitude. Projected or local-coordinate GML data must normally be reprojected to EPSG:4326 during export.
How to convert GML to KML
Using QGIS
- Install a current QGIS release and open the GML with Layer → Add Layer → Add Vector Layer. Select the required feature type if QGIS lists multiple layers.
- Check the input layer's assigned CRS in its properties. If the GML does not provide a usable CRS, obtain the correct CRS from the data provider; do not infer it from coordinate values alone.
- Right-click the layer and choose Export → Save Features As….
- Set Format to
Keyhole Markup Language (KML), choose a filename ending in.kml, and set the output CRS toEPSG:4326 - WGS 84. - Choose the fields to retain and enable export of selected features only when required. Save the file, then inspect it in Google Earth Pro or another KML viewer.
Export each required layer separately when the source contains multiple feature types or when the target application does not handle multiple KML layers reliably.
Using GDAL
GDAL's OGR utilities provide repeatable conversion for GML that the installed GML driver can read. A typical reprojection and export is:
ogr2ogr -f KML output.kml input.gml -t_srs EPSG:4326
If the input CRS is missing but known, specify it before reprojection:
ogr2ogr -f KML output.kml input.gml -s_srs EPSG:27700 -t_srs EPSG:4326
List detected layers and feature types before converting a multi-layer file:
ogrinfo input.gml
Convert a selected layer by name:
ogr2ogr -f KML output.kml input.gml layer_name -t_srs EPSG:4326
Use ogrinfo -so input.gml layer_name to inspect the detected geometry and fields. GDAL must be built with GML support, and complex application schemas may require schema files or may expose only part of the source data.
Using an online converter
For ordinary, non-sensitive vector data, MyGeodata Cloud and similar GIS conversion services can convert GML through a browser: upload the file, choose KML, specify the source CRS when requested, and download the result. Do not upload cadastral, infrastructure, personal-location, or restricted data to a third-party server. Online services may also limit file size, layer count, geometry complexity, or retained attributes.
Quality and compatibility limits
- CRS errors cause the most severe failures. A missing or incorrect source CRS can place features in the wrong country or far from their real location. Reprojection changes coordinate values, not the underlying survey accuracy.
- GML attributes, namespaces, schema-defined types, topology, measures, time values, and links may not map cleanly to KML. KML generally preserves simple descriptive fields rather than the complete GML data model.
- KML supports points, lines, and polygons, but complex surfaces, solids, curves, 3D objects, and schema-specific geometry may be simplified, rejected, or exported incompletely. Compare the result with the source layer.
- GIS symbology does not automatically transfer to equivalent KML styling. Categorized colors, labels, transparency, and scale-dependent rules may need manual adjustment.
- Large datasets can produce slow viewers and very large XML files. Filter or simplify geometry when appropriate. Create
.kmzonly after validating the KML; compression does not restore data discarded during conversion.
Information about file extensions and file types is provided by File-Extensions.org
Suggested software and links: gml to kml converters
Additional formats for
gml file conversion
Reverse conversion
Convert to kml from
other formats
- pdf to kml
- dwg to kml
- txt to kml
- jpg to kml
- jpeg to kml
- shp to kml
- dxf to kml
- shp.zip to kml
- csv to kml
- trk to kml
- bmp to kml
- bsb to kml
- dgn to kml
- dwf to kml
- dwt to kml
- fit to kml
- gdb to kml
- gdb.zip to kml
- geojson to kml
- ghd to kml
- gif to kml
- gpi to kml
- gpkg to kml
- gpx to kml
- gtable to kml
- igc to kml
- iges to kml
- jnx to kml
- kap to kml
- kmz to kml
- lmx to kml
- loc to kml
- map to kml
- mid to kml
- mif to kml
- nmea to kml
- ocd to kml
- ov2 to kml
- ovl to kml
- plt to kml
- png to kml
- prc to kml
- rte to kml
- tab to kml
- tcx to kml
- tif to kml
- tiff to kml
- tpo to kml
- twl to kml
- upoi to kml
- wpt to kml