Code Monkey home page Code Monkey logo

kml2ofds's Introduction

KML2OFDS

KML2OFDS is a python script for converting KML maps of fibre optic network infrastructure to the Open Fibre Data Standard. Consult the documentation for more info.

Assumptions

Core to OFDS is the principle that any span of fibre must be terminated at either end by a Point of Presence of some kind. Here we are using Point of Presence in a very loose sense. This might be a simple access point such as a manhole or it might be a full point of presence access point. Consult the standard for more details.

As such, KML2OFDS expects a KML file that contains both fibre optic routes as well as points of presence.

In broad strokes the script:

  • parses a KML document for features and separates them into a collection of nodes (any point feature in the KML) and spans (any LineString or collection of LineStrings) in the KML;
  • checks for duplicate nodes based on a combination of node 'name' and node latitude, longitude based on an adjustable level of location precision
  • the script snaps nodes to the closest point on the closest span, if they are not already somewhere on a span;
  • it then breaks each span at every point where a node intersects a span, resulting in a larger number of shorter spans;
  • a node is then associated each with the "start" and "end" of each of the spans; and,
  • adds meta data to the spans and nodes. at the moment on the most basic meta data is added during the export process

kml2ofds's People

Contributors

stevesong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.