Examples of CoverageInfo


Examples of org.geoserver.catalog.CoverageInfo

           
            // filter out disabled coverages
            for (Iterator it = coverages.iterator(); it.hasNext();) {
                // GR: I don't think we should be removing directly from the list returned by
                // Catalog?
                CoverageInfo cv = (CoverageInfo) it.next();
                if(!cv.enabled())
                    it.remove();
            }
           
            // filter out coverages that are not in the requested namespace
            if(request.getNamespace() != null) {
                String namespace = request.getNamespace();
                for (Iterator it = coverages.iterator(); it.hasNext();) {
                    CoverageInfo cv = (CoverageInfo) it.next();
                    if(!namespace.equals(cv.getStore().getWorkspace().getName()))
                        it.remove();
                }
            }
           
            Collections.sort(coverages, new CoverageInfoLabelComparator());
            for (Iterator i = coverages.iterator(); i.hasNext();) {
                CoverageInfo cv = (CoverageInfo) i.next();
                if (cv.enabled())
                    handleCoverageSummary(cv);
            }

            end("wcs:Contents");
        }
View Full Code Here

Examples of org.geoserver.catalog.CoverageInfo

                if (!(o instanceof CoverageInfo)) {
                    throw new IllegalArgumentException(new StringBuffer(
                            "Not a GetCapabilitiesType: ").append(o).toString());
                }

                CoverageInfo info = (CoverageInfo) o;

                final AttributesImpl attributes = new AttributesImpl();
                attributes.addAttribute("", "xmlns:wcs", "xmlns:wcs", "", WCS_URI);

                attributes.addAttribute("", "xmlns:xlink", "xmlns:xlink", "",
View Full Code Here

Examples of org.geoserver.catalog.CoverageInfo

        }
        if ( !super.equals( obj ) ) {
            return false;
        }
       
        final CoverageInfo other = (CoverageInfo) obj;
        if (defaultInterpolationMethod == null) {
            if (other.getDefaultInterpolationMethod() != null)
                return false;
        } else if (!defaultInterpolationMethod
                .equals(other.getDefaultInterpolationMethod()))
            return false;
        if (dimensions == null) {
            if (other.getDimensions() != null)
                return false;
        } else if (!dimensions.equals(other.getDimensions()))
            return false;
        if (grid == null) {
            if (other.getGrid() != null)
                return false;
        } else if (!grid.equals(other.getGrid()))
            return false;
        if (interpolationMethods == null) {
            if (other.getInterpolationMethods() != null)
                return false;
        } else if (!interpolationMethods.equals(other.getInterpolationMethods()))
            return false;
        if (nativeFormat == null) {
            if (other.getNativeFormat() != null)
                return false;
        } else if (!nativeFormat.equals(other.getNativeFormat()))
            return false;
        if (parameters == null) {
            if (other.getParameters() != null)
                return false;
        } else if (!parameters.equals(other.getParameters()))
            return false;
        if (requestSRS == null) {
            if (other.getRequestSRS() != null)
                return false;
        } else if (!requestSRS.equals(other.getRequestSRS()))
            return false;
        if (responseSRS == null) {
            if (other.getResponseSRS() != null)
                return false;
        } else if (!responseSRS.equals(other.getResponseSRS()))
            return false;
        if (supportedFormats == null) {
            if (other.getSupportedFormats() != null)
                return false;
        } else if (!supportedFormats.equals(other.getSupportedFormats()))
            return false;
        return true;
    }
View Full Code Here

Examples of org.geoserver.catalog.CoverageInfo

    public GridCoverageReader getCoverageReader() throws IOException {
        if (type != TYPE_RASTER) {
            throw new IllegalArgumentException("Layer type is not raster");
        }

        CoverageInfo resource = (CoverageInfo) layerInfo.getResource();
        GridCoverageReader coverageReader = resource.getGridCoverageReader(null, null);
        return coverageReader;
    }
View Full Code Here

Examples of org.geoserver.catalog.CoverageInfo

            FeatureTypeInfo data = factory.createFeatureType();
            builder.updateFeatureType(data, resource);
            l.setResource(data);
        }
        else if (origResource instanceof CoverageInfo){
            CoverageInfo resource = (CoverageInfo) origResource;
            CoverageInfo data = factory.createCoverage();
            builder.updateCoverage( data,  resource);
            l.setResource(data);
        }
        else if (origResource instanceof WMSLayerInfo){
            WMSLayerInfo resource = (WMSLayerInfo) origResource;
View Full Code Here

Examples of org.geoserver.catalog.CoverageInfo

        }
        else if (store instanceof CoverageStoreInfo) {
            CoverageStoreInfo covStore = (CoverageStoreInfo) store;
            builder.setStore(covStore);

            CoverageInfo cov = null;
            try {
                cov = builder.buildCoverage(resourceName.getLocalPart());
            } catch (Exception e) {
                Throwables.propagateIfInstanceOf(e, IOException.class);
                Throwables.propagate(e);
View Full Code Here

Examples of org.geoserver.catalog.CoverageInfo

                    IO.schema(json.putObject("schema"), data.getFeatureType(),false);
                } catch (IOException e) {
                }
            }
           else if (info instanceof CoverageInfo ){
               CoverageInfo data = (CoverageInfo) info;
               IO.schemaGrid(json.putObject("schema"),data,false);
           }
        }
        return json;
    }
View Full Code Here

Examples of org.geoserver.catalog.CoverageInfo

            try {
                if (layerInfo.getType() == Type.VECTOR) {
                    FeatureType featureType = mli.getFeature().getFeatureType();
                    request.setLayer(featureType);
                } else if (layerInfo.getType() == Type.RASTER) {
                    CoverageInfo coverageInfo = mli.getCoverage();

                    // it much safer to wrap a reader rather than a coverage in most cases, OOM can
                    // occur otherwise
                    final AbstractGridCoverage2DReader reader;
                    reader = (AbstractGridCoverage2DReader) coverageInfo.getGridCoverageReader(
                            new NullProgressListener(), GeoTools.getDefaultHints());
                    final SimpleFeatureCollection feature;
                    feature = FeatureUtilities.wrapGridCoverageReader(reader, null);
                    request.setLayer(feature.getSchema());
                }
View Full Code Here

Examples of org.geoserver.catalog.CoverageInfo

                if (layer == null || layer.getType() != LayerInfo.Type.RASTER) {
                    throw new WcsException("Could not find the specified coverage: " + coverageId,
                            WcsExceptionCode.InvalidParameterValue, "coverage");
                }

                CoverageInfo ci = catalog.getCoverageByName(coverageId);
                try {
                    handleCoverageOffering(ci);
                } catch (Exception e) {
                    throw new RuntimeException(
                            "Unexpected error occurred during describe coverage xml encoding", e);
View Full Code Here

Examples of org.geoserver.catalog.CoverageInfo

    LayerInfo layerInfo = catalog.getLayerByName(layer);
    if (layerInfo != null) {
      ResourceInfo obj = layerInfo.getResource();
      /* Check if it's feature type or coverage */
      if (obj instanceof CoverageInfo) {
        CoverageInfo cvInfo;
        cvInfo = (CoverageInfo) obj;
       
        StyleInfo defaultStyle = layerInfo.getDefaultStyle();
        RasterSymbolizer rasterSymbolizer = getRasterSymbolizer(defaultStyle);
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.