Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 17, 2025. It is now read-only.
Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purpose

This module can be used to generate the necessary data for the Interlocking UI. It provides the methods export_topology(), export_placement() and export_routes() on the Exporter class.

Simple example to export Potsdam Hbf

import json
from orm_importer.importer import ORMImporter
from interlocking_ui_exporter.exporter import Exporter

polygon = "52.389626549040095 13.069975376129152 52.39248124796051 13.070275783538818 52.39410493928074 13.054568767547607 52.39134200952107 13.05426836013794"  

topology = ORMImporter().run(polygon)

for node in topology.nodes.values():
    if len(node.connected_nodes) > 1:
        node.calc_anschluss_of_all_nodes()

exporter = Exporter(topology)
topology = exporter.export_topology()
placement = exporter.export_placement()
routes = exporter.export_routes()

print(json.dumps(topology))
print()
print(json.dumps(placement))
print()
print(json.dumps(routes))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.