Examples of DimensionSliceType


Examples of net.opengis.wcs20.DimensionSliceType

        assertEquals("C0001", gc.getCoverageId());
       
        // slicing
        EList<DimensionSubsetType> dss = gc.getDimensionSubset();
        assertEquals(2, dss.size());
        DimensionSliceType ds1 = (DimensionSliceType) dss.get(0);
        assertEquals("Long", ds1.getDimension());
        assertEquals("1", ds1.getSlicePoint());
        DimensionSliceType ds2 = (DimensionSliceType) dss.get(1);
        assertEquals("Lat", ds2.getDimension());
        assertEquals("1", ds2.getSlicePoint());
       
        // format
        assertEquals("application/gml+xml", gc.getFormat());
    }
View Full Code Here

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

Examples of net.opengis.wcs20.DimensionSliceType

        // 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

Examples of net.opengis.wcs20.DimensionSliceType

                // 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

Examples of net.opengis.wcs20.DimensionSliceType

                    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

Examples of net.opengis.wcs20.DimensionSliceType

                    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

Examples of net.opengis.wcs20.DimensionSliceType

                     } 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

Examples of net.opengis.wcs20.DimensionSliceType

        }
    }
   
    @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

Examples of net.opengis.wcs20.DimensionSliceType

        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
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.