@Override
 public void decode(ProfileReadContext ctx, Product p) throws IOException {
   final Band[] bands = p.getBands();
   for (Band band : bands) {
     String variableName = ReaderUtils.getVariableName(band);
     final Variable variable = ctx.getNetcdfFile().getRootGroup().findVariable(variableName);
     final IndexCoding indexCoding = readIndexCoding(variable, band.getName() + "_index_coding");
     if (indexCoding != null) {
       p.getIndexCodingGroup().add(indexCoding);
       band.setSampleCoding(indexCoding);
     }
   }
 }
  @Override
  public void decode(ProfileReadContext ctx, Product p) throws IOException {
    Element eosElement = (Element) ctx.getProperty(HdfEosUtils.STRUCT_METADATA);

    List<HdfEosGridInfo> gridInfos = HdfEosGridInfo.createGridInfos(eosElement);
    List<HdfEosGridInfo> compatibleGridInfos = HdfEosGridInfo.getCompatibleGridInfos(gridInfos);
    if (!compatibleGridInfos.isEmpty()) {
      HdfEosGridInfo hdfEosGeocodingInfo = compatibleGridInfos.get(0);
      attachGeoCoding(
          p,
          hdfEosGeocodingInfo.upperLeftLon,
          hdfEosGeocodingInfo.upperLeftLat,
          hdfEosGeocodingInfo.lowerRightLon,
          hdfEosGeocodingInfo.lowerRightLat,
          hdfEosGeocodingInfo.projection,
          hdfEosGeocodingInfo.getProjectionParameter());
    }
  }