osm-to-euroscope

A tool to generate Radar Screens from OSM Data
git clone git://archive.git.mtrnord.blog/MTRNord/osm-to-euroscope.git
Log | Files | Refs | README | LICENSE

main.rs (1256B)


      1 //#![feature(test)]
      2 #![allow(non_snake_case)]
      3 
      4 extern crate clap;
      5 
      6 use std::process::exit;
      7 
      8 use clap::{App, Arg, SubCommand};
      9 
     10 use crate::euroscope_ground::generate_ese_ground_taxiway;
     11 
     12 mod types;
     13 mod utils;
     14 #[macro_use]
     15 mod macros;
     16 mod euroscope_ground;
     17 
     18 #[tokio::main]
     19 async fn main() -> Result<(), Box<dyn std::error::Error>> {
     20     let matches = App::new("OSM_to_Euroscope")
     21         .version("0.1.0")
     22         .author("MTRNord <info@nordgedanken.de>")
     23         .about("Converts OpenStreetMap Data to Euroscope Radar Screens")
     24         .subcommand(SubCommand::with_name("taxiways")
     25             .about("Converts taxiways to Euroscope Ground Networks")
     26             .arg(Arg::with_name("airport")
     27                 .short("a")
     28                 .long("airport")
     29                 .value_name("ICAO ID")
     30                 .takes_value(true)
     31                 .required(true)
     32                 .help("The ICAO identifier of the Airport which should be converted")))
     33         .get_matches();
     34 
     35 
     36     if let Some(matches) = matches.subcommand_matches("taxiways") {
     37         generate_ese_ground_taxiway(matches.value_of("airport").unwrap()).await?;
     38     } else {
     39         println!("Please use the taxiways sub command!");
     40         exit(1);
     41     }
     42     Ok(())
     43 }
     44 
     45 #[cfg(test)]
     46 mod tests;