Package net.opengis.wcs20

Examples of net.opengis.wcs20.DimensionSliceType


        assertEquals(2, dss.size());
        DimensionTrimType dt = (DimensionTrimType) dss.get(0);
        assertEquals("Long", dt.getDimension());
        assertEquals("20", dt.getTrimLow());
        assertEquals("29", dt.getTrimHigh());
        DimensionSliceType ds = (DimensionSliceType) dss.get(1);
        assertEquals("Lat", ds.getDimension());
        assertEquals("1", ds.getSlicePoint());

        // format
        assertEquals("application/gml+xml", gc.getFormat());
        assertEquals("multipart/related", gc.getMediaType());
    }
View Full Code Here


        // split on all commas not contained in quotes
        String[] vpElements = valuePoint.split(",\\s*(?=([^\"]*\"[^\"]*\")*[^\"]*$)");
        if (vpElements.length == 1) {
            // point
            String point = parsePoint(vpElements[0], false);
            DimensionSliceType slice = Wcs20Factory.eINSTANCE.createDimensionSliceType();
            slice.setDimension(dimension);
            slice.setCRS(crs);
            slice.setSlicePoint(point);
            return slice;
        } else if (vpElements.length == 2) {
            String low = parsePoint(vpElements[0], true);
            String high = parsePoint(vpElements[1], true);

View Full Code Here

                // notice how we choose the order of the axes
                subsettingEnvelope.setRange(axisIndex, low, high);
            } else if (dim instanceof DimensionSliceType) {

                // SLICING
                final DimensionSliceType slicing= (DimensionSliceType) dim;
                final String slicePointS = slicing.getSlicePoint();
                final double slicePoint=Double.parseDouble(slicePointS);           

                final int axisIndex=envelopeDimensionsMapper.getAxisIndex(sourceEnvelopeInSubsettingCRS, dimension);
                if (axisIndex < 0) {
                    throw new WCS20Exception("Invalid axis provided",WCS20Exception.WCS20ExceptionCode.InvalidAxisLabel,dimension);
View Full Code Here

                    timeSubset = new DateRange(low, high);
                } else if (dim instanceof DimensionSliceType) {

                    // SLICING
                    final DimensionSliceType slicing = (DimensionSliceType) dim;
                    final String slicePointS = slicing.getSlicePoint();
                    final Date slicePoint = PARSER.parseDateTime(slicePointS);
                    timeSubset = new DateRange(slicePoint, slicePoint);
                } else {
                    throw new WCS20Exception(
                            "Invalid element found while attempting to parse dimension subsetting request: " + dim.getClass()
View Full Code Here

                    elevationSubset = new NumberRange<Double>(Double.class, low, high);
                } else if (dim instanceof DimensionSliceType) {

                    // SLICING
                    final DimensionSliceType slicing = (DimensionSliceType) dim;
                    final String slicePointS = slicing.getSlicePoint();
                    final Double slicePoint = PARSER.parseDouble(slicePointS);

                    elevationSubset = new NumberRange<Double>(Double.class, slicePoint, slicePoint);
                } else {
                    throw new WCS20Exception(
View Full Code Here

                     } else
                    if (dim instanceof DimensionSliceType) {

                        // SLICING
                        final DimensionSliceType slicing = (DimensionSliceType) dim;
                        setSubsetValue(dimension, slicing.getSlicePoint(), selectedValues);

                    } else {
                        throw new WCS20Exception(
                                "Invalid element found while attempting to parse dimension subsetting request: "
                                        + dim.getClass().toString(),
View Full Code Here

        }
    }
   
    @Test
    public void testSliceString() throws Exception {
        DimensionSliceType result = (DimensionSliceType) parser.parse("mydim(\"myvalue\")");
        assertEquals("mydim", result.getDimension());
        assertEquals("myvalue", result.getSlicePoint());
    }
View Full Code Here

        assertEquals("myvalue", result.getSlicePoint());
    }
   
    @Test
    public void testSliceNumber() throws Exception {
        DimensionSliceType result = (DimensionSliceType) parser.parse("mydim(12345)");
        assertEquals("mydim", result.getDimension());
        assertEquals("12345", result.getSlicePoint());
    }
View Full Code Here

        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());
        DimensionTrimType latTrim = trims.get(1);
        assertEquals("Lat", latTrim.getDimension());
        assertEquals("46", latTrim.getTrimLow());
        assertEquals("48", latTrim.getTrimHigh());
        DimensionTrimType timeTrim = trims.get(2);
        assertEquals("phenomenonTime", timeTrim.getDimension());
        assertEquals("2011-01-18T22:21:52Z", timeTrim.getTrimLow());
        assertEquals("2011-01-18T22:22:52Z", timeTrim.getTrimHigh());

    }
View Full Code Here

        assertEquals("C0001", gc.getCoverageId());
       
        // trimming
        EList<DimensionSubsetType> dss = gc.getDimensionSubset();
        assertEquals(2, dss.size());
        DimensionTrimType dt1 = (DimensionTrimType) dss.get(0);
        assertEquals("Long", dt1.getDimension());
        assertEquals("1", dt1.getTrimLow());
        assertEquals("2", dt1.getTrimHigh());
        DimensionTrimType dt2 = (DimensionTrimType) dss.get(1);
        assertEquals("Lat", dt2.getDimension());
        assertEquals("1", dt2.getTrimLow());
        assertEquals("2", dt2.getTrimHigh());

        // format
        assertEquals("application/gml+xml", gc.getFormat());
        assertEquals("multipart/related", gc.getMediaType());
    }
View Full Code Here

TOP

Related Classes of net.opengis.wcs20.DimensionSliceType

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.