Java源码示例:org.geotools.ows.ServiceException

示例1
private static BufferedImage downloadWmsImage(GetMapRequest mapRequest, WebMapServer wms) throws IOException,
        ServiceException {
    GetMapResponse mapResponse = wms.issueRequest(mapRequest);
    try (InputStream inputStream = mapResponse.getInputStream()) {
        return ImageIO.read(inputStream);
    }
}
 
示例2
private static WebMapServer getWmsServer(PropertySet configuration) throws IOException, ServiceException {
    return new WebMapServer((URL) configuration.getValue(WmsLayerType.PROPERTY_NAME_URL));
}