예제 #1
0
파일: EnviHeader.java 프로젝트: pmar/nest
 private static void writedescription(PrintWriter out, RasterDataNode rasterDataNode) {
   assert rasterDataNode != null;
   String description = rasterDataNode.getDescription();
   String unit = rasterDataNode.getUnit();
   if (unit == null || unit.trim().length() == 0) {
     unit = "1";
   }
   if (rasterDataNode.isLog10Scaled()) {
     unit = "log(" + unit + ")";
   }
   unit = " - Unit: " + unit;
   String wavelength = "";
   //        String bandwidth = "";
   if (rasterDataNode instanceof Band) {
     Band band = (Band) rasterDataNode;
     if (band.getSpectralWavelength() != 0.0) {
       wavelength = " - Wavelength: " + band.getSpectralWavelength() + "nm";
       //                bandwidth = " - Bandwidth: " + band.getSpectralBandwidth() + "nm";
     }
   }
   if (description == null || description.trim().length() == 0) {
     description = rasterDataNode.getProduct().getDescription();
   }
   out.println(
       "description = {"
           + description
           + unit
           + wavelength
           //                    + bandwidth
           + "}");
 }
예제 #2
0
파일: EnviHeader.java 프로젝트: pmar/nest
 /**
  * Writes the wavelength value to the out stream if the given rasterDataNode is an instance of
  * <code>BAND</code>
  *
  * @param out - the tream to write to
  * @param rasterDataNode the <code>RasterDataNode</code>
  */
 private static void writeWavelength(PrintWriter out, RasterDataNode rasterDataNode) {
   if (rasterDataNode instanceof Band) {
     final Band band = (Band) rasterDataNode;
     final float spectralWavelength = band.getSpectralWavelength();
     if (spectralWavelength != 0) {
       out.println("wavelength = {" + spectralWavelength + "}");
     }
   }
 }