GML to GeoPackage Converter
Import complex XML geodata into indexable database tables.
This tool is designed to parse raw, complex GML XML documents and import the resulting vector lines and attributes into indexed SQLite tables inside a portable GeoPackage database.
Drag file here to convert, or select file
Supported file extension: .gml • Max 50MB
Specification Rules
- Consolidate loose CAD XML data imports into standard GIS systems
- Speed up spatial queries on GML datasets by building spatial indexes
- Convert government data formats for offline GIS applications
- Requires deeply nested XML elements to map correctly to database fields
- Validations depend strictly on source schema definitions
- Large files can cause high processing loads
GDAL Direct Equivalent Terminal Command
When to use this conversion
Convert when GML data (especially complex schemas like ALKIS NAS or INSPIRE feeds) needs to enter a desktop GIS workflow with spatial indexing. GeoPackage is the right target for any non-trivial GML import because it preserves multiple feature types as separate layers.
Technical Details
GeoPackage is typically 5–15% the size of the source GML. The compression is dramatic because XML overhead is replaced with compact binary geometry plus SQLite storage.
Common Errors & Fixes
- Schema not detected: missing .gfs and ambiguous XML structure. Fix: open in QGIS first to generate .gfs, then re-run.
- Multipolygon geometries empty: complex gml:Surface unsupported. Fix: preprocess to simpler geometry or use FME.
- Driver libxml2 missing: required for complex schemas. Fix: install conda-forge gdal or build with libxml2.
- Memory spike on large files: GML is parsed in chunks but feature schemas can be enormous. Fix: filter early with -sql and ensure machine has 8 GB+ RAM.
Alternative Tools
- QGIS: drag the .gml in, all feature types appear; export each as GeoPackage
- ogr2ogr CLI: ogr2ogr -f GPKG output.gpkg input.gml
- FME for production GML pipelines
- norBIT alkis tools for German cadastral conversion
Frequently Asked Questions
Can I convert cadastral land parcels using this tool?
Yes. This converter imports public cadastral layers from GML sources into database tables.
What happens to unmapped properties?
Extra XML attributes are stored as generalized flat JSON characters in coordinate fields.
Does it require active spatial schemas?
Yes, our processing engine automatically validates the source schemas to secure data integrity.