org.opengis.coverage.grid.Format.getName()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(170)

本文整理了Java中org.opengis.coverage.grid.Format.getName()方法的一些代码示例,展示了Format.getName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Format.getName()方法的具体详情如下:
包路径:org.opengis.coverage.grid.Format
类名称:Format
方法名:getName

Format.getName介绍

[英]Name of the file format.
[中]文件格式的名称。

代码示例

代码示例来源:origin: geoserver/geoserver

@Override
public String getName() {
  return delegateFormat.getName();
}

代码示例来源:origin: geoserver/geoserver

public static Format acquireFormat(String type) throws IOException {
  Format[] formats = GridFormatFinder.getFormatArray();
  Format format = null;
  final int length = formats.length;
  for (int i = 0; i < length; i++) {
    if (formats[i].getName().equals(type)) {
      format = formats[i];
      break;
    }
  }
  if (format == null) {
    throw new IOException("Cannot handle format: " + type);
  } else {
    return format;
  }
}

代码示例来源:origin: geoserver/geoserver

/**
 * When loading from DTO use the params to locate factory.
 *
 * <p>bleck
 */
public static Format aquireFactoryByType(String type) {
  final Format[] formats = GridFormatFinder.getFormatArray();
  Format format = null;
  final int length = formats.length;
  for (int i = 0; i < length; i++) {
    format = formats[i];
    if (format.getName().equals(type)) {
      return format;
    }
  }
  return null;
}

代码示例来源:origin: geoserver/geoserver

/**
 * Returns the format for a coverage.
 *
 * <p>The format is inferred from {@link CoverageStoreInfo#getType()}
 *
 * @param info The coverage metadata.
 * @return The format, or null.
 */
@SuppressWarnings("deprecation")
public AbstractGridFormat getGridCoverageFormat(CoverageStoreInfo info) {
  final int length = CoverageStoreUtils.formats.length;
  for (int i = 0; i < length; i++) {
    if (CoverageStoreUtils.formats[i].getName().equals(info.getType())) {
      return (AbstractGridFormat) CoverageStoreUtils.formats[i];
    }
  }
  return null;
}

代码示例来源:origin: geoserver/geoserver

throw new Exception(
    "Unable to acquire test coverage and image layout for format:"
        + format.getName());
throw new Exception(
    "Unable to acquire test coverage and color model for format:"
        + format.getName());
throw new Exception(
    "Unable to acquire test coverage and sample model for format:"
        + format.getName());

代码示例来源:origin: geoserver/geoserver

new StringBuilder("Generated from ").append(format.getName()).toString());
cinfo.getKeywords().add(new Keyword(format.getName()));
cinfo.setNativeFormat(format.getName());
cinfo.getMetadata()
    .put(
for (Iterator i = formats.iterator(); i.hasNext(); ) {
  final Format fTmp = (Format) i.next();
  final String fName = fTmp.getName();

代码示例来源:origin: org.geoserver.web/gs-web-core

/** @return the name/description set of available raster formats */
private Map<String, Format> getAvailableCoverageStores() {
  if (coverages == null) {
    Format[] availableFormats = GridFormatFinder.getFormatArray();
    Map<String, Format> formatNames = new HashMap<String, Format>();
    for (Format format : availableFormats) {
      formatNames.put(format.getName(), format);
    }
    coverages = formatNames;
  }
  return coverages;
}

代码示例来源:origin: org.geoserver.web/web-core

/**
 * @return the name/description set of available raster formats
 */
private Map<String, Format> getAvailableCoverageStores() {
  if (coverages == null) {
    Format[] availableFormats = GridFormatFinder.getFormatArray();
    Map<String, Format> formatNames = new HashMap<String, Format>();
    for (Format format : availableFormats) {
      formatNames.put(format.getName(), format);
    }
    coverages = formatNames;
  }
  return coverages;
}

代码示例来源:origin: org.geoserver/gs-wcs2_0

@Override
  public String getMimeType(CoverageInfo ci) throws IOException {
    GridCoverageReader reader = ci.getGridCoverageReader(null, null);
    if (formatName.equals(reader.getFormat().getName())) {
      return mime;
    }

    return null;
  }
}

代码示例来源:origin: org.geoserver.web/web-core

public Object getPropertyValue(StoreInfo item) {
    String type = item.getType();
    if(type != null) {
      return type;
    }
    try {
      ResourcePool resourcePool = getCatalog().getResourcePool();
      if(item instanceof DataStoreInfo) {
        DataStoreInfo dsInfo = (DataStoreInfo) item;
        DataAccessFactory factory = resourcePool.getDataStoreFactory(dsInfo);
        if(factory != null) {
          return factory.getDisplayName();
        }
      } else if(item instanceof CoverageStoreInfo) {
        Format format = resourcePool.getGridCoverageFormat((CoverageStoreInfo) item);
        if(format != null) {
          return format.getName();
        }
      } 
    } catch(Exception e) {
      // fine, we tried
    }
    return "?";
  }
};

代码示例来源:origin: org.geoserver.web/gs-web-core

public Object getPropertyValue(StoreInfo item) {
    String type = item.getType();
    if (type != null) {
      return type;
    }
    try {
      ResourcePool resourcePool = getCatalog().getResourcePool();
      if (item instanceof DataStoreInfo) {
        DataStoreInfo dsInfo = (DataStoreInfo) item;
        DataAccessFactory factory = resourcePool.getDataStoreFactory(dsInfo);
        if (factory != null) {
          return factory.getDisplayName();
        }
      } else if (item instanceof CoverageStoreInfo) {
        Format format =
            resourcePool.getGridCoverageFormat((CoverageStoreInfo) item);
        if (format != null) {
          return format.getName();
        }
      }
    } catch (Exception e) {
      // fine, we tried
    }
    return "?";
  }
};

代码示例来源:origin: org.geoserver/gs-restconfig

info.setType(coverageFormat.getName());
URL uploadedFileURL = URLs.fileToUrl(Resources.find(uploadedFile));
if (method.isInline()) {

代码示例来源:origin: org.geoserver/restconfig

info.setType(coverageFormat.getName());
if (isInlineUpload(method)) {

相关文章