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
- Parsing KML – Reads placemarks (points and lines) from the uploaded file.
- Filtering ignored nodes – Removes nodes that are marked as ignored in the configuration.
- Breaking spans at node points – Splits line segments wherever they intersect with node
locations.
- Merging contiguous spans – Joins adjacent line segments that share endpoints (optional,
configurable).
- Adding missing nodes – Creates nodes at span endpoints that do not yet have a node.
- Adding nodes to spans – Associates each span with its start and end node references.
- Consolidating auto-generated nodes – Merges nodes that are closer than your consolidation
threshold.
- Final filter – Removes spans with identical start and end nodes, and applies network status
and provider metadata to all features.
- 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:
- File size – Maximum upload size is 50MB.
- Encoding – KML must be valid UTF-8 text.
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):
- Nodes GeoJSON (
{prefix}_ofds-nodes_{date}.geojson) – Point features for each
network node.
- Spans GeoJSON (
{prefix}_ofds-spans_{date}.geojson) – LineString features for
each fibre span, with references to start and end nodes.
- OFDS JSON (
{prefix}_ofds-json_{date}.json) – OFDS bundle for import into QGIS and the OFDS Studio plugin.
You can validate OFDS output using the COVE validation tool.
Start converting →