private static void ProcessParser(GeoToH3Parser target) { var h3 = new GeoCoord(((decimal)target.Latitude).DegreesToRadians(), ((decimal)target.Longitude).DegreesToRadians()) .ToH3Index(target.Resolution); Console.WriteLine(h3.ToString()); }
private static void Main(string[] args) { using var parser = new CommandLineParser.CommandLineParser(); args = args.Select(s => s.ToLower()).ToArray(); try { var argParser = new GeoToH3Parser(); parser.ExtractArgumentAttributes(argParser); parser.ParseCommandLine(args); ProcessParser(argParser); } catch (Exception) { Console.WriteLine("Unable to parse input."); parser.ShowUsage(); } }