Why convert GML to SHP?
GML (Geography Markup Language) is a verbose XML interchange format that many GIS tools support but can be slow to query. Shapefiles are the most widely accepted GIS exchange format, supported by virtually every GIS application, CAD package, and mapping service. Converting GML to .shp makes the data faster to open and compatible with software that lacks a GML driver.
How to convert GML to SHP
QGIS OPEN-SOURCE
Add the .gml as a vector layer, right-click in the Layers panel, choose Export > Save Features As, set Format to ESRI Shapefile, and click OK - QGIS writes the .shp, .shx, .dbf, and .prj files.
ogr2ogr OPEN-SOURCE
Run ogr2ogr -f "ESRI Shapefile" output.shp input.gml on the command line; GDAL is included with QGIS or installable via OSGeo4W.
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 .shp file is almost always an Esri Shapefile - geospatial vector data (points, lines, polygons) used by GIS software. It is one piece of a set: it needs its sibling files (.shx, .dbf, and…
Open .SHP details →Quality & what to watch
- A Shapefile is always multiple files - at minimum .shp (geometry), .shx (index), and .dbf (attributes); keep the .prj file too so the coordinate reference system is not lost.
- The DBF format limits attribute field names to 10 characters - longer GML field names will be truncated automatically.
- The Shapefile format supports only one geometry type per file; multi-geometry GML layers must be split during export.