Package org.geoserver.catalog

Examples of org.geoserver.catalog.CoverageInfo


   
    AffineTransform guessGridToWorld(boolean resolutionMode) {
        try {
            String coverageName = coverage.getModelObject();
            Catalog catalog = GeoServerApplication.get().getCatalog();
            CoverageInfo ci = catalog.getCoverageByName(coverageName);
           
            ReferencedEnvelope nativeBounds = getCoverage.bounds.transform(ci.getCRS(), true);
            ReferencedEnvelope targetBounds = nativeBounds.transform(getCoverage.targetCRS, true);
            GridEnvelope2D gridLimits = guessGridLimits();
            GridGeometry2D gg = new GridGeometry2D(gridLimits, targetBounds);
            AffineTransform at = (AffineTransform) gg.getGridToCRS(PixelInCell.CELL_CORNER);
            if(resolutionMode) {
View Full Code Here


                    "xmlns:gml", GML.NAMESPACE, "xmlns:ogc", OGC.NAMESPACE, "xsi:schemaLocation",
                    WCS_URI + " " + "http://schemas.opengis.net/wcs/1.1.1/wcsAll.xsd");

            start("GetCoverage", attributes);
            element("ows:Identifier", request.coverage);
            CoverageInfo coverage = catalog.getCoverageByName(request.coverage);
            start("DomainSubset");
            handleSpatialSubset(request, coverage);
            end("DomainSubset");
            handleOutput(request);
            end("GetCoverage");
View Full Code Here

public class CoverageResourceConfigurationPanel extends ResourceConfigurationPanel {

    public CoverageResourceConfigurationPanel(final String panelId, final IModel model){
        super(panelId, model);

        final CoverageInfo coverage = (CoverageInfo) getResourceInfo();
       
        final Map<String, Serializable> parameters = coverage.getParameters();
        List<String> keys = new ArrayList<String>(parameters.keySet());
        Collections.sort(keys);

        final IModel paramsModel = new PropertyModel(model, "parameters");
        ListView paramsList = new ListView("parameters", keys) {
View Full Code Here

        NamespaceInfo ns = catalog.getFactory().createNamespace();
        ns.setPrefix( "bar" );
        ns.setURI( "http://bar" );
        catalog.add( ns );
       
        CoverageInfo ft = catalog.getFactory().createCoverage();
        ft.setName( "foo" );
        ft.setNamespace( ns );
        ft.setStore( catalog.getCoverageStoreByName( "acme", "foostore"));
        catalog.add( ft );
       
        assertTrue( d.exists() );
    }
View Full Code Here

    }
   
    public void testModifyCoverage() throws Exception {
        testAddCoverage();
       
        CoverageInfo ft = catalog.getCoverageByName( "bar", "foo" );
        ft.setTitle( "fooTitle" );
        catalog.save( ft );
       
        File f = new File( testData.getDataDirectoryRoot(),
            "workspaces/acme/foostore/foo/coverage.xml");
        Document dom = dom( f );
View Full Code Here

       
        File d = new File( testData.getDataDirectoryRoot(),
        "workspaces/acme/foostore/foo");
        assertTrue( d.exists() );
       
        CoverageInfo ft = catalog.getCoverageByName( "bar", "foo" );
        catalog.remove( ft );
       
        assertFalse( d.exists() );
    }
View Full Code Here

     *
     * @throws NoSuchElementException
     */
    public static String findCoverageDirName(String coverageName) {
        Catalog data = getCatalog();
        CoverageInfo coverageInfo = data.getCoverageByName(coverageName);
        return coverageInfo.getMetadata().get( "dirName", String.class );
    }
View Full Code Here

        assertTrue( catalog.getCoverages().isEmpty() );
       
        addCoverage();
        assertEquals( 1, catalog.getCoverages().size() );
       
        CoverageInfo cv2 = catalog.getFactory().createCoverage();
        try {
            catalog.add(cv2);
            fail( "adding with no name should throw exception");
        }
        catch( Exception e ) {}
       
        cv2.setName("cv2Name");
        try {
            catalog.add(cv2);
            fail( "adding with no store should throw exception");
        }
        catch( Exception e ) {}
       
        cv2.setStore( cs );
        catalog.add( cv2 );
        assertEquals( 2, catalog.getCoverages().size() );

        CoverageInfo fromCatalog = catalog.getCoverageByName("cv2Name");
        assertNotNull(fromCatalog);
        //ensure the collection properties are set to NullObjects and not to null
        assertNotNull(fromCatalog.getParameters());
       
        CoverageInfo cv3 = catalog.getFactory().createCoverage();
        cv3.setName( "cv3Name");
        try {
            catalog.getCoverages().add( cv3 );
            fail( "adding directly should throw an exception");
        }
        catch( Exception e ) {}
View Full Code Here

                    OGC.NAMESPACE, "xsi:schemaLocation", WCS_URI + " "
                            + "http://schemas.opengis.net/wcs/1.0.0/getCoverage.xsd");

            start("GetCoverage", attributes);
            element("sourceCoverage", request.coverage);
            CoverageInfo coverage = catalog.getCoverageByName(request.coverage);
            start("domainSubset");
            handleSpatialSubset(request, coverage);
            end("domainSubset");
            handleOutput(request);
            end("GetCoverage");
View Full Code Here

     * Sets the coverage info
     * @deprecated use {@link #setCoverage(CoverageInfo)}
     */
    public void setCoverageName(String coverageName){
        this.coverageName = coverageName;
        CoverageInfo c = catalog.getCoverageByName( coverageName );
        if ( c == null ) {
            return;
            //throw new IllegalArgumentException("No coverage named " + coverageName + " in catalog");
        }
        setCoverage(c);
View Full Code Here

TOP

Related Classes of org.geoserver.catalog.CoverageInfo

Copyright © 2018 www.massapicom. 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.