Examples of DescribeEOCoverageSetType


Examples of net.opengis.wcs20.DescribeEOCoverageSetType

    Parser parser = new Parser(new WCSEOConfiguration());

    @Test
    public void testParseDescribeCoverage() throws Exception {
        String capRequestPath = "requestDescribeEOCoverageSet.xml";
        DescribeEOCoverageSetType dcs = (DescribeEOCoverageSetType) parser.parse(getClass()
                .getResourceAsStream(capRequestPath));
        assertEquals("WCS", dcs.getService());
        assertEquals("2.0.0", dcs.getVersion());

        List<String> ids = dcs.getEoId();
        assertEquals(1, ids.size());
        assertEquals("someDatasetSeries", ids.get(0));
       
        assertEquals(100, dcs.getCount());
       
        EList<Section> sections = dcs.getSections().getSection();
        assertEquals(2, sections.size());
        assertEquals(Section.COVERAGEDESCRIPTIONS, sections.get(0));
        assertEquals(Section.DATASETSERIESDESCRIPTIONS, sections.get(1));
       
        EList<DimensionTrimType> trims = dcs.getDimensionTrim();
        assertEquals(3, trims.size());
        DimensionTrimType lonTrim = trims.get(0);
        assertEquals("Long", lonTrim.getDimension());
        assertEquals("16", lonTrim.getTrimLow());
        assertEquals("18", lonTrim.getTrimHigh());
View Full Code Here

Examples of net.opengis.wcs20.DescribeEOCoverageSetType

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        if (invocation.getMethod().getName().equals("describeEOCoverageSet") && isEarthObservationEnabled()) {
            try {
                DescribeEOCoverageSetType dcs = (DescribeEOCoverageSetType) invocation
                        .getArguments()[0];
                return describeEOCoverageSet(dcs);
            } catch (Exception e) {
                if (e instanceof ServiceException) {
                    throw e;
View Full Code Here

Examples of net.opengis.wcs20.DescribeEOCoverageSetType

        /**
         * Encode the object.
         */
        @Override
        public void encode(Object o) throws IllegalArgumentException {
            DescribeEOCoverageSetType dcs = (DescribeEOCoverageSetType) o;

            List<CoverageInfo> coverages = getCoverages(dcs);
            List<CoverageGranules> coverageGranules = getCoverageGranules(dcs, coverages);
            int granuleCount = getGranuleCount(coverageGranules);
            Integer maxCoverages = getMaxCoverages(dcs);
            int returned;
            if(maxCoverages != null) {
                returned = granuleCount < maxCoverages ? granuleCount : maxCoverages;
            } else {
                returned = granuleCount;
            }

            String eoSchemaLocation = ResponseUtils.buildSchemaURL(dcs.getBaseUrl(),
                    "wcseo/1.0/wcsEOAll.xsd");
            Attributes atts = atts(
                    "xmlns:eop",
                    "http://www.opengis.net/eop/2.0", //
                    "xmlns:gml",
                    "http://www.opengis.net/gml/3.2", //
                    "xmlns:wcsgs",
                    "http://www.geoserver.org/wcsgs/2.0", //
                    "xmlns:gmlcov", "http://www.opengis.net/gmlcov/1.0", "xmlns:om",
                    "http://www.opengis.net/om/2.0", "xmlns:swe", "http://www.opengis.net/swe/2.0",
                    "xmlns:wcs", "http://www.opengis.net/wcs/2.0", "xmlns:wcseo",
                    "http://www.opengis.net/wcseo/1.0", "xmlns:xlink",
                    "http://www.w3.org/1999/xlink", "xmlns:xsi",
                    "http://www.w3.org/2001/XMLSchema-instance", "numberMatched",
                    String.valueOf(granuleCount), "numberReturned", String.valueOf(returned),
                    "xsi:schemaLocation", "http://www.opengis.net/wcseo/1.0 " + eoSchemaLocation);

            start("wcseo:EOCoverageSetDescription", atts);

            if(!coverageGranules.isEmpty()) {
                List<CoverageGranules> reducedGranules = coverageGranules;
                if(maxCoverages != null) {
                    reducedGranules = applyMaxCoverages(coverageGranules, maxCoverages);
                }

                boolean allSections = dcs.getSections() == null
                        || dcs.getSections().getSection() == null
                        || dcs.getSections().getSection().contains(Section.ALL);
                if (allSections
                        || dcs.getSections().getSection().contains(Section.COVERAGEDESCRIPTIONS)) {
                    handleCoverageDescriptions(reducedGranules);
                }
                if (allSections
                        || dcs.getSections().getSection().contains(Section.DATASETSERIESDESCRIPTIONS)) {
                    handleDatasetSeriesDescriptions(coverageGranules);
                }
            }

            end("wcseo:EOCoverageSetDescription");
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.