A project about creating a beautiful map of trains for a selected area.
- .NET 8.0
- Clone the repository
- Obtain the data from OpenStreetMap as an .osm.pbf file and save it in
data/raw
. You can use Geofabrik to download the data. - 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 indata/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"
- Run the program
dotnet run --project TAINEer
- The output will be saved in
data/output
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 |
This project is licensed under the MIT License - see the LICENSE file for details.
This project uses the OsmSharp, SkiaSharp and System.CommandLine libraries.