This importer uses railway data from OpenStreetMap (visible e.g. on https://openrailwaymap.org) to create a corresponding topology with yaramo objects.
python3 -m venv .venv
(macOS/Linux) or py -3 -m venv .venv
source .venv/bin/activate
(macOS/Linux) or .venv\Scripts\activate.bat
poetry install
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.