gpt4 book ai didi

org.geotools.data.ows.WMSRequest.getGetMap()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 17:35:05 24 4
gpt4 key购买 nike

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

WMSRequest.getGetMap介绍

[英]DOCUMENT ME!
[中]记录我!

代码示例

代码示例来源:origin: org.geotools/gt-wms

public WMSCoverageReader(WebMapServer wms, Layer layer, String style) {
  this.wms = wms;
  // init the reader
  addLayer(layer, style);
  // best guess at the format with a preference for PNG (since it's normally transparent)
  List<String> formats = wms.getCapabilities().getRequest().getGetMap().getFormats();
  this.format = formats.iterator().next();
  for (String format : formats) {
    if ("image/png".equals(format)
        || "image/png24".equals(format)
        || "png".equals(format)
        || "png24".equals(format)
        || "image/png; mode=24bit".equals(format)) {
      this.format = format;
      break;
    }
  }
}

代码示例来源:origin: org.geotools/gt2-wms

public GeneralParameterDescriptor createFormatReadParam() {
  Map properties = fillProperties("FORMAT",
      "Value contains the desired format");
  GeneralParameterDescriptor param = new DefaultParameterDescriptor(properties,
      String.class,
      capabilities.getRequest().getGetMap().getFormats().toArray(new String[capabilities.getRequest().getGetMap().getFormats().size()]), null,
      null, null, null, true);
  return param;
}

代码示例来源:origin: org.geoserver.community/gs-wps-download

private String getCascadingFormat(WebMapServer server) {
  // best guess at the format with a preference for PNG (since it's normally transparent)
  List<String> formats = server.getCapabilities().getRequest().getGetMap().getFormats();
  String requestFormat = null;
  for (String format : formats) {
    if (format.toLowerCase().contains("image/png") || "png".equalsIgnoreCase(format)) {
      requestFormat = format;
      break;
    }
  }
  // if we did not find any format looking like PNG choose any that ImageIO would likely read
  if (requestFormat == null) {
    for (String format : formats) {
      String loFormat = format.toLowerCase();
      if (loFormat.contains("jpeg")
          || loFormat.contains("gif")
          || loFormat.contains("tif")) {
        requestFormat = format;
        break;
      }
    }
  }
  if (requestFormat == null) {
    throw new WPSException(
        "Could not find a suitable WMS cascading format among server supported formats: "
            + formats);
  }
  return requestFormat;
}

代码示例来源:origin: org.geotools/gt-wms

/**
 * Creates a GetMapRequest that can be configured and then passed to issueRequest().
 *
 * @return a configureable GetMapRequest object
 */
public GetMapRequest createGetMapRequest() {
  URL onlineResource = findURL(getCapabilities().getRequest().getGetMap());
  return (GetMapRequest) getSpecification().createGetMapRequest(onlineResource);
}

代码示例来源:origin: org.geotools/gt2-wms

/**
 * Creates a GetMapRequest that can be configured and then passed to 
 * issueRequest(). 
 * 
 * @return a configureable GetMapRequest object
 */
public GetMapRequest createGetMapRequest() {
  URL onlineResource = findURL(getCapabilities().getRequest().getGetMap());
  return (GetMapRequest) getSpecification().createGetMapRequest(onlineResource);
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com