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."); }
private static void extract(string inputFolder, string outputFile, double x, double y, double size) { var extractor = new SquareExtractor(x, y, 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."); }