Skip to content

simulate-digital-rail/orm-importer

Repository files navigation

orm-importer

This importer uses railway data from OpenStreetMap (visible e.g. on https://openrailwaymap.org) to create a corresponding topology with yaramo objects.

Setup

  1. Create a virtual environment with python3 -m venv .venv (macOS/Linux) or py -3 -m venv .venv
  2. Activate the virtual environment with source .venv/bin/activate (macOS/Linux) or .venv\Scripts\activate.bat
  3. Run poetry install

Usage

from orm_importer.importer import ORMImporter

# any number of points (each being a pair of coordinates separated by a space) representing a polygon
polygon = ""  
topology = ORMImporter().run(polygon)

Examples for how to use the orm-importer can be found in the demo repository.

About

This converter allows to query Open Railway Maps data and creates yaramo instances

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages