Free · No signup · GDAL-powered

Convert DXF to GML Online — Free & Instant

Converting DXF to GML (Geography Markup Language) bridges the CAD and OGC worlds — turning AutoCAD geometry into the XML-based standard used by government data portals, INSPIRE-compliant datasets, and Web Feature Services (WFS). GML is the mandatory format for the EU INSPIRE Directive and is natively supported by GeoServer, QGIS, ArcGIS Server, and any OGC-compliant spatial data infrastructure. This conversion is common in infrastructure, utilities, and cadastral workflows where CAD-designed assets (pipelines, parcels, road centrelines) need to be published as interoperable GML features. Maparz uses GDAL's OGR layer to convert DXF geometry types — lines, polylines, and points — to their GML equivalents, outputting GML 2.1.2 by default. Note that DXF files must use real-world georeferenced coordinates (not local drawing coordinates) for the GML output to be spatially meaningful.

File converter

When to convert DXF to GML

  • Publishing AutoCAD infrastructure or utility geometry via an OGC WFS service in GML
  • Converting DXF cadastral boundary data to GML for government land registry submissions
  • Preparing AutoCAD road or pipeline drawings for INSPIRE-compliant GML delivery
  • Loading DXF survey geometry into GeoServer or MapServer as GML feature types
  • Converting DXF building footprints to GML for urban planning data portals

How to convert DXF to GML

  1. 1

    Georeference your DXF

    Ensure your DXF file uses real-world coordinates (projected or geographic). DXF files in local drawing space will produce GML with meaningless coordinates.

  2. 2

    Upload your DXF

    Drop your .dxf file on the upload zone. Files up to 50 MB are supported.

  3. 3

    Select GML

    Click GML in the output format panel.

  4. 4

    Load into your GIS

    Import the downloaded .gml into QGIS, GeoServer, ArcGIS, or any OGC-compliant system. QGIS opens GML via Layer → Add Vector Layer.

About DXF

Drawing Exchange Format (DXF) is the open interoperability format developed by Autodesk for AutoCAD. It is widely used in civil engineering, architecture, and urban planning workflows. DXF files contain geometric primitives like lines, arcs, polylines, and text. When converting DXF files to GIS formats like Shapefile or GeoJSON, the geometry is preserved but attribute data may be minimal since DXF layers are mapped to feature properties. Conversely, GIS data exported to DXF can be brought into CAD workflows for drafting.

Strengths

  • +Universal in CAD workflows
  • +Supported by AutoCAD, Revit, FreeCAD, LibreCAD
  • +Good for precise engineering geometry

About GML

Geography Markup Language (GML) is an XML-based OGC standard for encoding geographic features. It is the mandatory format for the EU INSPIRE directive and is commonly used in Web Feature Services (WFS) to deliver geospatial data over the web. GML files are highly interoperable across GIS platforms and are natively supported by GDAL, QGIS, ArcGIS, and GeoServer. GML can represent complex geometries, coordinate reference systems, and rich attribute schemas, making it the format of choice for authoritative government and infrastructure datasets.

Strengths

  • +OGC standard — maximum interoperability
  • +Mandatory for EU INSPIRE datasets
  • +Supports complex geometries and CRS metadata
  • +Native support in QGIS, ArcGIS, and GeoServer

Frequently asked questions

Q.Does my DXF need to be georeferenced for GML conversion?

Yes — this is the most important requirement. GML is a geospatial format, so the coordinates in the output GML are taken directly from the DXF geometry. If your DXF uses a local coordinate system (e.g. a drawing where the origin is an arbitrary project point), the GML will contain those local coordinates, which will not place correctly on a map. For georeferenced DXF files — where coordinates are real-world Eastings/Northings or lat/lon values — the conversion produces valid, mappable GML features.

Q.What GML version does Maparz output?

Maparz outputs GML 2.1.2, which is the most widely supported version for data exchange and WFS services. GML 2.1.2 is supported by GeoServer, MapServer, ArcGIS Server, QGIS, and all INSPIRE-compliant platforms. If your target system requires GML 3.x, you can use GDAL locally with: ogr2ogr -f GML -dsco GML_FEATURE_COLLECTION=YES -dsco FORMAT=GML3 output.gml input.dxf

Q.Which DXF entity types are converted to GML?

GDAL's DXF driver converts the most common CAD entity types: POINT entities become GML Point features, LINE and LWPOLYLINE entities become GML LineString or MultiLineString features, and closed polylines or HATCH boundaries can become GML Polygon features. Complex DXF entities like BLOCKS, XREFS, and 3D solids (ACIS/SAT geometry) are not converted — only 2D geometric primitives are reliably supported.

Q.How do I load the GML into GeoServer?

In GeoServer, go to Data → Stores → Add New Store, select GML as the data source type, and point to your .gml file (or publish it at a reachable URL). GeoServer will read the feature type schema from the GML's .xsd schema file. If the .xsd is missing, GeoServer can auto-detect the schema. You can then publish the layer as a WFS endpoint serving GML to downstream clients.

Related conversions