| 47 | #[derive(Debug, Parser)] |
| 48 | #[clap(name = "snap", verbatim_doc_comment)] |
| 49 | struct CmdlineOptions { |
| 50 | /// The log level |
| 51 | #[clap(short, long, default_value_t = tracing::Level::INFO)] |
| 52 | log_level: tracing::Level, |
| 53 | |
| 54 | /// Input file to read input from. Defaults to stdin. |
| 55 | #[clap(short, long)] |
| 56 | input: Option<PathBuf>, |
| 57 | |
| 58 | /// Input geometry format. |
| 59 | #[clap(short = 'I', long, default_value_t = InputFormat::Wkt)] |
| 60 | input_format: InputFormat, |
| 61 | |
| 62 | /// Output file to write result to. Defaults to stdout. |
| 63 | #[clap(short, long)] |
| 64 | output: Option<PathBuf>, |
| 65 | |
| 66 | /// The strategy to use for snapping |
| 67 | #[clap(short, long, default_value_t = CliSnappingStrategy::ClosestPoint)] |
| 68 | strategy: CliSnappingStrategy, |
| 69 | |
| 70 | /// The tolerance to use when snapping |
| 71 | #[clap(short, long, default_value_t = 0.001)] |
| 72 | tolerance: f64, |
| 73 | } |
| 74 | |
| 75 | fn main() -> eyre::Result<()> { |
| 76 | color_eyre::install()?; |
nothing calls this directly
no outgoing calls
no test coverage detected