About kml2ofds

Convert KML fibre network maps to the Open Fibre Data Standard (OFDS)

Overview

kml2ofds is a tool for converting maps of terrestrial fibre networks created in KML format into Open Fibre Data Standard (OFDS) compliant outputs. It produces nodes and spans as GeoJSON. The GeoJSON format lends itself to online maps and GIS software. The script also outputs a structured OFDS JSON file. The JSON file captures the relationships between the various tables making up the OFDS standard and is intended for importation into the QGIS platform using the OFDS Studio plugin.

How it works

  1. Parsing KML – Reads placemarks (points and lines) from the uploaded file.
  2. Filtering ignored nodes – Removes nodes that are marked as ignored in the configuration.
  3. Breaking spans at node points – Splits line segments wherever they intersect with node locations.
  4. Merging contiguous spans – Joins adjacent line segments that share endpoints (optional, configurable).
  5. Adding missing nodes – Creates nodes at span endpoints that do not yet have a node.
  6. Adding nodes to spans – Associates each span with its start and end node references.
  7. Consolidating auto-generated nodes – Merges nodes that are closer than your consolidation threshold.
  8. Final filter – Removes spans with identical start and end nodes, and applies network status and provider metadata to all features.
  9. Exporting – Writes prefixed GeoJSON and OFDS JSON files to a ZIP file (filenames use your Output filename prefix and date, e.g. {prefix}_ofds-nodes_{date}.geojson).

The web form mirrors this flow: you upload a KML file, configure network metadata and processing options, then download the results. A map preview shows nodes and spans after conversion.

Limitations

KML is a complex format with many possible variations. kml2ofds is designed to handle most common use cases, but may not work for all KML files. You may need to adjust the configuration to get the best results. In some cases, you may wish to edit the KML input manually prior to conversion. The script also has the following specific constraints:

Outputs

After conversion, you receive a ZIP archive containing three files named with your Output filename prefix and date (e.g. OFDS-My-Network-17-03-2026_ofds-nodes_17mar2026.geojson):

You can validate OFDS output using the COVE validation tool.

Start converting