private static void extract(string inputFolder, string outputFile, double latitude, double longitude, string projection, double size) { var converter = new Oware.LatLngUTMConverter(projection); var coordinates = converter.convertLatLngToUtm(latitude, longitude); var extractor = new SquareExtractor(coordinates.Easting, coordinates.Northing, size); Console.WriteLine("Reading all .xyz files in " + inputFolder + "..."); foreach (var file in new DirectoryInfo(inputFolder).GetFiles()) { Console.WriteLine(extractor.Count + " " + file.Name); if (file.Extension != ".xyz") { continue; } extractor.ProcessXYZFile(file, ','); } var points = extractor.GetCenteredPoints(); Console.WriteLine("Writing output file..."); XYZFile.Write(outputFile, points); Console.WriteLine("Complete."); }
static void Main(string[] args) { LatLngUTMConverter val = new LatLngUTMConverter(); double a = Convert.ToDouble(Console.ReadLine()); double b = Convert.ToDouble(Console.ReadLine()); System.Console.WriteLine(val.convertLatLngToUtm(a, b)); // string c = convertLatLngToUtm(a, b) System.Console.ReadKey(); }