Examples of NetcdfDatasetInfo


Examples of ucar.nc2.dataset.NetcdfDatasetInfo

  static void testNcd() throws IOException {
    String filename = "C:/data/test2.nc";
    NetcdfDataset ncfile = NetcdfDataset.openDataset(filename);
    measureSize("C:/data/test2.nc", ncfile, null, true);

    NetcdfDatasetInfo info = new NetcdfDatasetInfo(filename);
    measureSize("info", info, null, true);
    String pifo = info.getParseInfo();
    System.out.println("info= " + pifo);
    ncfile.close();
  }
View Full Code Here

Examples of ucar.nc2.dataset.NetcdfDatasetInfo

        //--- ISO: gmd:keywords
        boolean foundNetcdfInfo = false;
        if (!globalAttributes && !isCollection) {
          log.info("No global attributes describing metadata so opening dataset to get coordinate systems");
          try {
            NetcdfDatasetInfo ncDI = new NetcdfDatasetInfo("thredds:"+ds.getCatalogUrl());
            log.info("Coordinate systems builder is "+ncDI.getConventionUsed());
            if (!ncDI.getConventionUsed().equals("None")) {
              Document doc = ncDI.makeDocument();
              Element coords = doc.detachRootElement();
              log.info("Coordinate systems of dataset are: \n"+Xml.getString(coords));
              setCoordsStyleSheet(isCollection);
              addKeywordsAndDataParams(coords, md);
              foundNetcdfInfo = true;
            } else {
                            if(log.isDebugEnabled()) log.debug("Coordinate system convention is not recognized");
            }
            ncDI.close();
          } catch (Exception e) {
            log.info("Exception raised in netcdfDatasetInfo ops: "+e);
            e.printStackTrace();
          }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.