Package ucar.nc2.constants

Examples of ucar.nc2.constants.FeatureType


   * @param key if starts with ":", replace with value of global attribute
   * @param errlog error messages here
   * @return featureType, or null
   */
  static public FeatureType getFeatureType(NetcdfDataset ds, String key, Formatter errlog) {
    FeatureType ft = null;
    String fts = getLiteral(ds, key, errlog);
    if (fts != null) {
      ft = FeatureType.valueOf(fts.toUpperCase());
      if ((ft == null) && (errlog != null))
        errlog.format(" Cant find Feature type %s from %s\n", fts, key);
View Full Code Here


        assertNotNull( catBuilder );

        DatasetBuilder dsBldr = CatalogXmlUtils.assertCatalogWithContainerDatasetAsExpected( catBuilder, docBaseUri );
        ThreddsMetadataBuilder tmdBldr = dsBldr.getThreddsMetadataBuilder();
        FeatureType dataType = tmdBldr.getDataType();
        assertEquals( dataType, FeatureType.RADIAL );
    }
View Full Code Here

  }

  private void checkIfTrajectory(TableConfig st) {
    // deal with possible trajectory - only do this if dataset has metadata
    FeatureType ft = FeatureDatasetFactoryManager.findFeatureType(ds);
    if (ft == FeatureType.TRAJECTORY) {
      st.featureType = FeatureType.TRAJECTORY;
      TableConfig pc = new TableConfig(Table.Type.Top, "single");
      st.parent = pc;
      pc.addChild(st);
View Full Code Here

  }

  public void testdataTypeInherit() {
    InvCatalogImpl cat = TestCatalogAll.open("TestInherit.0.6.xml", true);
    InvDataset ds = null;
    FeatureType s = null;
    String val = null;

    ds = cat.findDatasetByID("top");
    s = ds.getDataType();
    assert (s == null) : s;
View Full Code Here

  }

  public void testAuthorityInherit() {
    InvCatalogImpl cat = TestCatalogAll.open("TestInherit.0.6.xml", true);
    InvDataset ds = null;
    FeatureType s = null;
    String val = null;

    ds = cat.findDatasetByID("top");
    val = ds.getAuthority();
    assert (val == null) : val;
View Full Code Here

    // this call must be thread safe - done by implementation
    return useFactory.open(wantFeatureType, ncd, analysis, task, errlog);
  }

  static private FeatureDataset wrapUnknown(NetcdfDataset ncd, ucar.nc2.util.CancelTask task, Formatter errlog) throws IOException {
    FeatureType ft = findFeatureType(ncd);
    if (ft != null)
      return wrap(ft, ncd, task, errlog);

    // analyse the coordsys rank
    if (isGrid(ncd.getCoordinateSystems())) {
View Full Code Here

    String fType = elem.getAttribute("type").getValue()// LOOK, may be multiple types
    String uri = elem.getAttribute("url").getValue();

    if (debug) System.out.printf("CdmrFeatureDataset endpoint %s%n ftype= %s uri=%s%n", endpoint, fType, uri);

    FeatureType ft = FeatureType.getType(fType);

    if (ft == null || ft == FeatureType.NONE || ft == FeatureType.GRID) {
      CdmRemote ncremote = new CdmRemote(uri);
      NetcdfDataset ncd = new NetcdfDataset(ncremote, null);
      return new GridDataset(ncd);
View Full Code Here

  }

  public void testdataTypeInherit() {
    InvCatalogImpl cat = TestCatalogAll.open(urlString, true);
    InvDataset ds = null;
    FeatureType s = null;
    String val = null;

    ds = cat.findDatasetByID("top");
    s = ds.getDataType();
    assert (s == null) : s;

    ds = cat.findDatasetByID("nest1");
    s = ds.getDataType();
    assert (s == FeatureType.GRID) : s;

    ds = cat.findDatasetByID("nest11");
    s = ds.getDataType();
    assert (s == FeatureType.GRID) : s;

    ds = cat.findDatasetByID("nest12");
    s = ds.getDataType();
    assert (s.toString().equalsIgnoreCase("Image")) : s;

    ds = cat.findDatasetByID("nest121");
    s = ds.getDataType();
    assert (s == FeatureType.GRID) : s;
View Full Code Here

  }

  public void testAuthorityInherit() {
    InvCatalogImpl cat = TestCatalogAll.open(urlString, true);
    InvDataset ds = null;
    FeatureType s = null;
    String val = null;

    ds = cat.findDatasetByID("top");
    val = ds.getAuthority();
    assert val.equals("ucar") : val;
View Full Code Here

    VNames vn = getVariableNames(ds, errlog);

    String levVarName = null;
    String levDimName = null;
    boolean hasStruct = Evaluator.hasRecordStructure(ds);
    FeatureType ft = Evaluator.getFeatureType(ds, ":thredds_data_type", errlog);
    if (null == ft) {
      if ((ds.findDimension("manLevel") != null) && (ds.findVariable("prMan") != null)) {
        ft = FeatureType.STATION_PROFILE;
        levVarName = "prMan";
        levDimName = "manLevel";
View Full Code Here

TOP

Related Classes of ucar.nc2.constants.FeatureType

Copyright © 2018 www.massapicom. 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.