@SuppressWarnings("ResultOfMethodCallIgnored") @Test public void testGetGeolocationVariableNames_invalidExtension() { try { SlstrLevel1ProductFactory.getGeolocationVariableNames("quatsch"); fail("IOException expected"); } catch (IOException expected) { } }
static String[] getGeolocationVariableNames(String extension) throws IOException { final String[] varNames = new String[2]; if (!(extension.equals("an") || extension.equals("ao") || extension.equals("bn") || extension.equals("bo") || extension.equals("cn") || extension.equals("co") || extension.equals("in") || extension.equals("io") || extension.equals("fn") || extension.equals("fo"))) { throw new IOException("Unknown or unsupported band extension: " + extension); } varNames[0] = "longitude_" + extension; varNames[1] = "latitude_" + extension; return varNames; }
SlstrLevel1ProductFactory extends SlstrProductFactory { static String[] getGeolocationVariableNames(String extension) throws IOException { final String[] varNames = new String[2]; if (!(extension.equals("an") || extension.equals("ao") || extension.equals("bn") || extension.equals("bo") || extension.equals("cn") || extension.equals("co") || extension.equals("in") || extension.equals("io") || extension.equals("fn") || extension.equals("fo"))) { throw new IOException("Unknown or unsupported band extension: " + extension); } varNames[0] = "longitude_" + extension; varNames[1] = "latitude_" + extension; return varNames; } }
SlstrLevel1ProductFactory extends SlstrProductFactory { static String[] getGeolocationVariableNames(String extension) throws IOException { final String[] varNames = new String[2]; if (!(extension.equals("an") || extension.equals("ao") || extension.equals("bn") || extension.equals("bo") || extension.equals("cn") || extension.equals("co") || extension.equals("in") || extension.equals("io") || extension.equals("fn") || extension.equals("fo"))) { throw new IOException("Unknown or unsupported band extension: " + extension); } varNames[0] = "longitude_" + extension; varNames[1] = "latitude_" + extension; return varNames; } SlstrLevel1ProductFactory(Sentinel3ProductReader productReader); }
SlstrLevel1ProductFactory extends SlstrProductFactory { static String[] getGeolocationVariableNames(String extension) throws IOException { final String[] varNames = new String[2]; if (!(extension.equals("an") || extension.equals("ao") || extension.equals("bn") || extension.equals("bo") || extension.equals("cn") || extension.equals("co") || extension.equals("in") || extension.equals("io") || extension.equals("fn") || extension.equals("fo"))) { throw new IOException("Unknown or unsupported band extension: " + extension); } varNames[0] = "longitude_" + extension; varNames[1] = "latitude_" + extension; return varNames; } SlstrLevel1ProductFactory(Sentinel3ProductReader productReader); @Override void dispose(); }
SlstrLevel1ProductFactory extends SlstrProductFactory { static String[] getGeolocationVariableNames(String extension) throws IOException { final String[] varNames = new String[2]; if (!(extension.equals("an") || extension.equals("ao") || extension.equals("bn") || extension.equals("bo") || extension.equals("cn") || extension.equals("co") || extension.equals("in") || extension.equals("io") || extension.equals("fn") || extension.equals("fo"))) { throw new IOException("Unknown or unsupported band extension: " + extension); } varNames[0] = "longitude_" + extension; varNames[1] = "latitude_" + extension; return varNames; } SlstrLevel1ProductFactory(Sentinel3ProductReader productReader); @Override void dispose(); final static String SLSTR_L1B_USE_PIXELGEOCODINGS; final static String SLSTR_L1B_LOAD_ORPHAN_PIXELS; final static String SLSTR_L1B_CUSTOM_CALIBRATION; final static String SLSTR_L1B_S3MPC_CALIBRATION; }