Search in sources :

Example 1 with RasterLayerDTO

use of org.geosdi.geoplatform.response.RasterLayerDTO in project geo-platform by geosdi.

the class GPWMSCapabilitesBuilderTest method c_loadWMSCapabilitiesTest.

@Test
public void c_loadWMSCapabilitiesTest() throws Exception {
    List<RasterLayerDTO> rasterLayers = wmsCapabilitiesBuilder.loadWMSCapabilitiesAuth("https://prosit.geosdi.org/geoserver/wms", null, null, null, null, null);
    checkArgument(rasterLayers.size() > 0);
    for (RasterLayerDTO rasterLayerDTO : rasterLayers.get(0).getSubLayerList()) {
        logger.info("######################LAYER : {} \n", rasterLayerDTO);
    }
}
Also used : RasterLayerDTO(org.geosdi.geoplatform.response.RasterLayerDTO) Test(org.junit.Test)

Example 2 with RasterLayerDTO

use of org.geosdi.geoplatform.response.RasterLayerDTO in project geo-platform by geosdi.

the class DTOServerConverter method createRasterLayerList.

/**
 * @param layers
 * @param list
 * @return {@link ArrayList<GPLayerGrid>}
 */
private ArrayList<? extends GPLayerGrid> createRasterLayerList(@Nullable List<? extends ShortLayerDTO> layers, ArrayList<GPLayerGrid> list) {
    if (layers != null) {
        for (ShortLayerDTO layer : layers) {
            if (((RasterLayerDTO) layer).getSubLayerList().size() > 0) {
                this.createRasterLayerList(((RasterLayerDTO) layer).getSubLayerList(), list);
            } else {
                GPRasterLayerGrid raster = this.convertToRasterLayerGrid((RasterLayerDTO) layer);
                list.add(raster);
            }
        }
    }
    return list;
}
Also used : ShortLayerDTO(org.geosdi.geoplatform.response.ShortLayerDTO) GPRasterLayerGrid(org.geosdi.geoplatform.gui.model.server.GPRasterLayerGrid) RasterLayerDTO(org.geosdi.geoplatform.response.RasterLayerDTO)

Example 3 with RasterLayerDTO

use of org.geosdi.geoplatform.response.RasterLayerDTO in project geo-platform by geosdi.

the class GPWMSCapabilitesBuilderTest method b_loadWMSCapabilitiesTest.

@Test
@Ignore
public void b_loadWMSCapabilitiesTest() throws Exception {
    List<RasterLayerDTO> rasterLayers = wmsCapabilitiesBuilder.loadWMSCapabilitiesAuth("https://servizi.protezionecivile.it/geoserver/wms", null, null, null, null, null);
    checkArgument(rasterLayers.size() > 0);
    for (RasterLayerDTO rasterLayerDTO : rasterLayers.get(0).getSubLayerList()) {
        logger.info("######################LAYER : {} - STYLE_LIST : {}\n", rasterLayerDTO, rasterLayerDTO.getStyleList());
    }
}
Also used : RasterLayerDTO(org.geosdi.geoplatform.response.RasterLayerDTO) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 4 with RasterLayerDTO

use of org.geosdi.geoplatform.response.RasterLayerDTO in project geo-platform by geosdi.

the class GPWMSCapabilitesBuilderTest method d_loadWMSCapabilitiesTest.

@Test
public void d_loadWMSCapabilitiesTest() throws Exception {
    List<RasterLayerDTO> rasterLayers = wmsCapabilitiesBuilder.loadWMSCapabilities("https://insar.irea.cnr.it/geoserver/geonode/wms", null, null, "dpc", "4WzL06EA");
    checkArgument(rasterLayers.size() > 0);
    for (RasterLayerDTO rasterLayerDTO : rasterLayers.get(0).getSubLayerList()) {
        logger.info("######################LAYER : {} \n", rasterLayerDTO);
    }
}
Also used : RasterLayerDTO(org.geosdi.geoplatform.response.RasterLayerDTO) Test(org.junit.Test)

Example 5 with RasterLayerDTO

use of org.geosdi.geoplatform.response.RasterLayerDTO in project geo-platform by geosdi.

the class GPWMSCapabilitesBuilderTest method a_loadWMSCapabilitiesTest.

@Test
public void a_loadWMSCapabilitiesTest() throws Exception {
    List<RasterLayerDTO> rasterLayers = wmsCapabilitiesBuilder.loadWMSCapabilities("http://150.145.141.180/geoserver/wms", null, null, null, null);
    checkArgument(rasterLayers.size() > 0);
    for (RasterLayerDTO rasterLayerDTO : rasterLayers.get(0).getSubLayerList()) {
        logger.info("######################LAYER : {} - STYLE_LIST : {}\n", rasterLayerDTO, rasterLayerDTO.getStyleList());
    }
}
Also used : RasterLayerDTO(org.geosdi.geoplatform.response.RasterLayerDTO) Test(org.junit.Test)

Aggregations

RasterLayerDTO (org.geosdi.geoplatform.response.RasterLayerDTO)7 Test (org.junit.Test)4 GeoPlatformServer (org.geosdi.geoplatform.core.model.GeoPlatformServer)2 ResourceNotFoundFault (org.geosdi.geoplatform.exception.ResourceNotFoundFault)2 ServerDTO (org.geosdi.geoplatform.response.ServerDTO)2 GPRasterLayerGrid (org.geosdi.geoplatform.gui.model.server.GPRasterLayerGrid)1 ShortLayerDTO (org.geosdi.geoplatform.response.ShortLayerDTO)1 Ignore (org.junit.Ignore)1