Skip to content

A project about creating a beautiful map of trains for a selected area.

License

Notifications You must be signed in to change notification settings

jmigual/TRAINer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TRAINer

A project about creating a beautiful map of trains for a selected area.

Example

Table of contents

How to use

Requirements

  • .NET 8.0

How to run

  1. Clone the repository
  2. Obtain the data from OpenStreetMap as an .osm.pbf file and save it in data/raw. You can use Geofabrik to download the data.
  3. Filter the data. You can use Osmium to filter the data. The final file should be data/raw/rail.osm.pbf The following command will filter the data to only include railways and save it in data/raw:
# Obtain only railway related
osmium tags-filter -o rail.osm.pbf -t --output-format pbf,add_metadata=false europe-latest.osm.pbf "w/railway=bridge,goods,light_rail,monorail,narrow_gauge,rail,subway,tram"
  1. Run the program
dotnet run --project TAINEer
  1. The output will be saved in data/output

Command line arguments

Additional command line arguments can be passed to the program. The following arguments are available:

Argument Description Default
--data The path to the data directory data
--min-lat Minimum latitude of the area to be processed -90
--max-lat Maximum latitude of the area to be processed 90
--min-lon Minimum longitude of the area to be processed -180
--max-lon Maximum longitude of the area to be processed 180
--color-main Color of the railway with the largest gauge. Colors are interpolated between the main and secondary color. #FFBA4A
--color-secondary Color of the railway with the smallest gauge. Colors are interpolated between the main and secondary color. #D5B690
--color-background Color of the background #1E1414

Licensing

This project is licensed under the MIT License - see the LICENSE file for details.

This project uses the OsmSharp, SkiaSharp and System.CommandLine libraries.

About

A project about creating a beautiful map of trains for a selected area.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages