cdm/src/main/java/ucar/nc2/ft/FeatureDatasetFactoryManager.java
static public FeatureType findFeatureType(NetcdfFile ncd) {
    // search for explicit featureType global attribute
    String cdm_datatype = ncd.findAttValueIgnoreCase(null,  CF.FEATURE_TYPE, null);
    if (cdm_datatype == null)
      cdm_datatype = ncd.findAttValueIgnoreCase(null, "cdm_data_type", null);
    if (cdm_datatype == null)
      cdm_datatype = ncd.findAttValueIgnoreCase(null, "cdm_datatype", null);
    if (cdm_datatype == null)
      cdm_datatype = ncd.findAttValueIgnoreCase(null, "thredds_data_type", null);

    if (cdm_datatype != null) {
      for (FeatureType ft : FeatureType.values())
        if (cdm_datatype.equalsIgnoreCase(ft.name())) {
          if (debug) System.out.println(" wrapUnknown found cdm_datatype " + cdm_datatype);
          return ft;
        }
    }

    CF.FeatureType cff = CF.FeatureType.getFeatureTypeFromGlobalAttribute(ncd);
    if (cff != null) return CF.FeatureType.convert(cff);


    return null;
  }
static public FeatureType findFeatureType(NetcdfFile ncd) {
    // search for explicit featureType global attribute
    String cdm_datatype = ncd.findAttValueIgnoreCase(null,  CF.FEATURE_TYPE, null);
    if (cdm_datatype == null)
      cdm_datatype = ncd.findAttValueIgnoreCase(null, "cdm_data_type", null);
    if (cdm_datatype == null)
      cdm_datatype = ncd.findAttValueIgnoreCase(null, "cdm_datatype", null);
    if (cdm_datatype == null)
      cdm_datatype = ncd.findAttValueIgnoreCase(null, "thredds_data_type", null);

    if (cdm_datatype != null) {
      for (FeatureType ft : FeatureType.values())
        if (cdm_datatype.equalsIgnoreCase(ft.name())) {
          if (debug) System.out.println(" wrapUnknown found cdm_datatype " + cdm_datatype);
          return ft;
        }
    }

    CF.FeatureType cff = CF.FeatureType.getFeatureTypeFromGlobalAttribute(ncd);
    if (cff != null) return CF.FeatureType.convert(cff);


    return null;
  }
Try to determine the feature type of the dataset, by examining its metadata.

@param ncd the dataset
@return FeatureType if found, else null