@@ -0,0 +1,1674 @@
+package org.openforis.collect.earth.sampler.utils;%0D%0A%0D%0Aimport java.io.File;%0D%0A%0D%0Aimport org.geotools.referencing.GeodeticCalculator;%0D%0Aimport org.geotools.referencing.crs.DefaultGeographicCRS;%0D%0Aimport org.openforis.collect.earth.core.utils.CsvReaderUtils;%0D%0A%0D%0Aimport au.com.bytecode.opencsv.CSVReader;%0D%0A%0D%0Apublic class CheckDistances %7B%0D%0A%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%0D%0A%09%09File csvFile = new File( %22C:%5C%5CUsers%5C%5CSanchezPausDiaz%5C%5CDownloads%5C%5Cecuador.csv%22);%0D%0A%09%09if( csvFile.exists() )%7B%0D%0A%09%09%09try %7B%0D%0A%0D%0A%09%09%09%09CSVReader reader = CsvReaderUtils.getCsvReader(csvFile.getAbsolutePath());%0D%0A%09%09%09%09String%5B%5D csvRow = reader.readNext();%0D%0A%0D%0A%09%09%09%09while ( csvRow != null ) %7B%0D%0A%09%09%09%09%09try %7B%09%09%09%09%0D%0A%09%09%09%09%09%09double%5B%5D coordinates0 = %7Bnew Double(csvRow%5B1%5D),%09new Double(csvRow%5B2%5D)%7D;%0D%0A%09%09%09%09%09%09if( (csvRow = reader.readNext()) !=null)%7B%0D%0A%09%09%09%09%09%09%09double%5B%5D coordinates1 = %7Bnew Double(csvRow%5B1%5D),%09new Double(csvRow%5B2%5D)%7D;%0D%0A%0D%0A%09%09%09%09%09%09%09final GeodeticCalculator calc = new GeodeticCalculator(DefaultGeographicCRS.WGS84);%0D%0A%0D%0A%09%09%09%09%09%09%09calc.setStartingGeographicPoint( coordinates0%5B1%5D, coordinates0%5B0%5D);%0D%0A%09%09%09%09%09%09%09calc.setDestinationGeographicPoint( coordinates1%5B1%5D, coordinates1%5B0%5D);%0D%0A%09%09%09%09%09%09%09System.out.print( ( coordinates0%5B0%5D - coordinates1%5B0%5D ) + %22 %22 +  ( coordinates0%5B1%5D - coordinates1%5B1%5D ) + %22  :  %22 );%0D%0A%09%09%09%09%09%09%09System.out.println( calc.getOrthodromicDistance() );%0D%0A%09%09%09%09%09%09%7Delse%7B%0D%0A%09%09%09%09%09%09%09System.out.println( %22Last row!!!%22 );%0D%0A%09%09%09%09%09%09%09break;%0D%0A%09%09%09%09%09%09%7D%0D%0A%09%09%09%09%09%7Dcatch(Exception e)%7B%0D%0A%09%09%09%09%09%09csvRow = reader.readNext();%0D%0A%09%09%09%09%09%09e.printStackTrace();%0D%0A%09%09%09%09%09%09%0D%0A%09%09%09%09%09%7D%0D%0A%09%09%09%09%7D%0D%0A%0D%0A%09%09%09%7Dcatch(Exception e)%7B%0D%0A%09%09%09%09e.printStackTrace();%0D%0A%09%09%09%7D%0D%0A%09%09%7Delse%7B%0D%0A%09%09%09System.out.println(%22CSV file not found %22 + csvFile.getAbsolutePath());%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%0D%0A%0D%0A%0D%0A%7D%0D%0A

Add class to check distance between plots