Examples of GetCoverageType


Examples of net.opengis.wcs20.GetCoverageType

    }
   
    @Test
    public void testParseGetCoverageGeotiff() throws Exception {
        String capRequestPath = "requestGetCoverageGeotiff.xml";
        GetCoverageType gc = (GetCoverageType) parser.parse(getClass()
                .getResourceAsStream(capRequestPath));
       
        Map<String, Object> extensions = getExtensionsMap(gc);
       
        // check values
View Full Code Here

Examples of net.opengis.wcs20.GetCoverageType

    }
   
    @Test
    public void testParseGetCoverageRangeSubset() throws Exception {
        String capRequestPath = "requestGetCoverageRangeSubsetting.xml";
        GetCoverageType gc = (GetCoverageType) parser.parse(getClass()
                .getResourceAsStream(capRequestPath));
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
       
View Full Code Here

Examples of net.opengis.wcs20.GetCoverageType

    }
   
    @Test
    public void testParseGetCoverageScaleByFactor() throws Exception {
        String capRequestPath = "requestGetCoverageScaleByFactor.xml";
        GetCoverageType gc = (GetCoverageType) parser.parse(getClass()
                .getResourceAsStream(capRequestPath));
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
       
View Full Code Here

Examples of net.opengis.wcs20.GetCoverageType

    }
   
    @Test
    public void testParseGetCoverageScaleAxesByFactor() throws Exception {
        String capRequestPath = "requestGetCoverageScaleAxesByFactor.xml";
        GetCoverageType gc = (GetCoverageType) parser.parse(getClass()
                .getResourceAsStream(capRequestPath));
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
       
View Full Code Here

Examples of net.opengis.wcs20.GetCoverageType

    }
   
    @Test
    public void testParseGetCoverageScaleToSize() throws Exception {
        String capRequestPath = "requestGetCoverageScaleToSize.xml";
        GetCoverageType gc = (GetCoverageType) parser.parse(getClass()
                .getResourceAsStream(capRequestPath));
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
       
View Full Code Here

Examples of net.opengis.wcs20.GetCoverageType

    }
   
    @Test
    public void testParseGetCoverageScaleToExtend() throws Exception {
        String capRequestPath = "requestGetCoverageScaleToExtent.xml";
        GetCoverageType gc = (GetCoverageType) parser.parse(getClass()
                .getResourceAsStream(capRequestPath));
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
       
View Full Code Here

Examples of net.opengis.wcs20.GetCoverageType

    }
   
    @Test
    public void testParseGetCoverageInterpolationLinear() throws Exception {
        String capRequestPath = "requestGetCoverageInterpolationLinear.xml";
        GetCoverageType gc = (GetCoverageType) parser.parse(getClass()
                .getResourceAsStream(capRequestPath));
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
       
View Full Code Here

Examples of net.opengis.wcs20.GetCoverageType

    }
   
    @Test
    public void testParseGetCoverageInterpolationMixed() throws Exception {
        String capRequestPath = "requestGetCoverageInterpolationMixed.xml";
        GetCoverageType gc = (GetCoverageType) parser.parse(getClass()
                .getResourceAsStream(capRequestPath));
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
       
View Full Code Here

Examples of net.opengis.wcs20.GetCoverageType

    }
   
    @Test
    public void testParseGetCoverageCRS() throws Exception {
        String capRequestPath = "requestGetCoverageCRS.xml";
        GetCoverageType gc = (GetCoverageType) parser.parse(getClass()
                .getResourceAsStream(capRequestPath));
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(2, extensions.size());
       
View Full Code Here

Examples of net.opengis.wcs20.GetCoverageType

    @Override
    public Operation operationDispatched(Request request, Operation operation) {
        Object[] parameters = operation.getParameters();
        if(parameters != null && parameters.length > 0 && parameters[0] instanceof GetCoverageType) {
            // check we are going against a granule
            GetCoverageType gc = (GetCoverageType) parameters[0];
            String coverageId = gc.getCoverageId();
            if(coverageId == null) {
                throw new WCS20Exception("Required parameter coverageId is missing",
                        WCS20Exception.WCS20ExceptionCode.MissingParameterValue, "coverageId");
            }
            CoverageInfo coverage = codec.getGranuleCoverage(coverageId);
            if(coverage != null) {
                // set the actual coverage name
                String actualCoverageId = NCNameResourceCodec.encode(coverage);
                gc.setCoverageId(actualCoverageId);
               
                // extract the granule filter
                Filter granuleFilter = codec.getGranuleFilter(coverageId);
               
                // check the filter actually matches one granule
                if(!readerHasGranule(coverage, granuleFilter)) {
                    throw new WCS20Exception("Could not locate coverage " + coverageId, WCS20ExceptionCode.NoSuchCoverage, "coverageId");
                }
               
                // set and/or merge with the previous filter
                Filter previous = gc.getFilter();
                if(previous == null || previous == Filter.INCLUDE) {
                    gc.setFilter(granuleFilter);
                } else {
                    gc.setFilter(FF.and(previous, granuleFilter));
                }
            }
        }
       
        return operation;
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.