Header { public EnviProjectionInfo getProjectionInfo() { String projectionInfoString = headerParser.getString(EnviConstants.HEADER_KEY_PROJECTION_INFO, null); if (projectionInfoString != null) { return parseProjectionInfo(projectionInfoString); } return null; } Header(final BufferedReader reader); ByteOrder getJavaByteOrder(); String getFileType(); int getNumSamples(); int getNumLines(); int getNumBands(); int getHeaderOffset(); int getDataType(); String getInterleave(); String getSensorType(); int getByteOrder(); EnviMapInfo getMapInfo(); EnviProjectionInfo getProjectionInfo(); String[] getBandNames(); String getDescription(); BeamProperties getBeamProperties(); String[] getWavelengths(); String[] getFWHM(); String getWavelengthsUnit(); double[] getDataOffsetValues(); double[] getDataGainValues(); Double getDataIgnoreValue(); int getNumClasses(); String[] getClassNmaes(); int[] getClassColorRGB(); static Properties loadProperties(String text); MetadataElement getAsMetadata();  }
@Test public void testParseProjectionInfo_multipleLines() throws IOException { final String lines = "projection info = {9, 6378137.0, 6356752.3, \n-17.500000, -63.500000, 0.0, 0.0, \n-32.500000, -2.500000, \nWGS-84, SamerAlbers, units=Meters}"; final BufferedReader in = createReader(createMandatoryHeader() + lines); final Header header = new Header(in); EnviProjectionInfo projectionInfo = header.getProjectionInfo(); assertEquals(9, projectionInfo.getProjectionNumber()); final double[] parameter = projectionInfo.getParameter(); assertEquals(8, parameter.length); assertEquals(6378137.0, parameter[0], 1e-8); assertEquals(6356752.3, parameter[1], 1e-8); assertEquals(-17.5, parameter[2], 1e-8); assertEquals(-63.5, parameter[3], 1e-8); assertEquals(0.0, parameter[4], 1e-8); assertEquals(0.0, parameter[5], 1e-8); assertEquals(-32.5, parameter[6], 1e-8); assertEquals(-2.5, parameter[7], 1e-8); assertEquals("WGS-84", projectionInfo.getDatum()); assertEquals("SamerAlbers", projectionInfo.getName()); }