EEToNetCDFExporterOp extends AbstractNetCDFExporterOp { static Coordinate[] convert(ArrayList<double[]> coordList) { final Coordinate[] coordinates = new Coordinate[coordList.size()]; for (int i = 0; i < coordinates.length; i++) { final double[] coord = coordList.get(i); coordinates[i] = new Coordinate(coord[0], coord[1]); } return coordinates; }  @Override void initialize(); static File getOutputFile(File dblFile, File targetDirectory); static final String ALIAS; }
@Test public void testConvert() { final ArrayList<double[]> rawCoords = new ArrayList<>(); rawCoords.add(new double[]{1.0, 2.0}); rawCoords.add(new double[]{3.0, 4.0}); rawCoords.add(new double[]{5.0, 6.0}); final Coordinate[] coordinates = EEToNetCDFExporterOp.convert(rawCoords); assertNotNull(coordinates); assertEquals(3, coordinates.length); assertEquals(1.0, coordinates[0].x, 1e-8); assertEquals(2.0, coordinates[0].y, 1e-8); assertEquals(3.0, coordinates[1].x, 1e-8); assertEquals(4.0, coordinates[1].y, 1e-8); assertEquals(5.0, coordinates[2].x, 1e-8); assertEquals(6.0, coordinates[2].y, 1e-8); }