org.geotools.ows.ServiceException Java Examples

The following examples show how to use org.geotools.ows.ServiceException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WmsLayerType.java    From snap-desktop with GNU General Public License v3.0 5 votes vote down vote up
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);
    }
}
 
Example #2
Source File: WmsLayerType.java    From snap-desktop with GNU General Public License v3.0 4 votes vote down vote up
private static WebMapServer getWmsServer(PropertySet configuration) throws IOException, ServiceException {
    return new WebMapServer((URL) configuration.getValue(WmsLayerType.PROPERTY_NAME_URL));
}