Package net.opengis.wcs10

Examples of net.opengis.wcs10.RangeSubsetType


        public Object visit(SimpleNode node, Object data) {
            throw new UnsupportedOperationException("This method should never be reached");
        }

        public Object visit(ASTRangeSubset node, Object data) {
            RangeSubsetType rs = wcsf.createRangeSubsetType();
            for (int i = 0; i < node.jjtGetNumChildren(); i++) {
                ASTFieldSubset fs = (ASTFieldSubset) node.jjtGetChild(i);
                FieldSubsetType fst = (FieldSubsetType) fs.jjtAccept(this, data);
                rs.getFieldSubset().add(fst);
            }
            return rs;
        }
View Full Code Here


        raw.put("BoundingBox", "-45,146,-42,147");
       
        // ok, finally something we can parse
        raw.put("rangeSubset", "BlueMarble:nearest[Bands[Red_band]]");
        GetCoverageType getCoverage = (GetCoverageType) reader.read(reader.createRequest(), parseKvp(raw), raw);
        RangeSubsetType rs = getCoverage.getRangeSubset();
        assertNotNull(rs);
        assertEquals(1, rs.getFieldSubset().size());
        FieldSubsetType field = (FieldSubsetType) rs.getFieldSubset().get(0);
        assertEquals("BlueMarble", field.getIdentifier().getValue());
        assertEquals(1, field.getAxisSubset().size());
        AxisSubsetType axis = (AxisSubsetType) field.getAxisSubset().get(0);
        assertEquals("Bands", axis.getIdentifier());
        List keys = axis.getKey();
View Full Code Here

   * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
   * @generated
   */
    public NotificationChain basicSetRangeSubset(RangeSubsetType newRangeSubset, NotificationChain msgs) {
    RangeSubsetType oldRangeSubset = rangeSubset;
    rangeSubset = newRangeSubset;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs11Package.GET_COVERAGE_TYPE__RANGE_SUBSET, oldRangeSubset, newRangeSubset);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

        raw.put("BoundingBox", "-45,146,-42,147");
       
        // ok, finally something we can parse
        raw.put("rangeSubset", "BlueMarble:nearest[Bands[Red_band]]");
        GetCoverageType getCoverage = (GetCoverageType) reader.read(reader.createRequest(), parseKvp(raw), raw);
        RangeSubsetType rs = getCoverage.getRangeSubset();
        assertNotNull(rs);
        assertEquals(1, rs.getFieldSubset().size());
        FieldSubsetType field = (FieldSubsetType) rs.getFieldSubset().get(0);
        assertEquals("BlueMarble", field.getIdentifier().getValue());
        assertEquals(1, field.getAxisSubset().size());
        AxisSubsetType axis = (AxisSubsetType) field.getAxisSubset().get(0);
        assertEquals("Bands", axis.getIdentifier());
        List keys = axis.getKey();
View Full Code Here

public class RangeSubsetKvpParserTest extends TestCase {
    RangeSubsetKvpParser parser = new RangeSubsetKvpParser();
   
    public void testSimpleFields() throws Exception {
        RangeSubsetType rs = (RangeSubsetType) parser.parse("radiance;temperature");
        assertNotNull(rs);
        assertEquals(2, rs.getFieldSubset().size());
        FieldSubsetType field = (FieldSubsetType) rs.getFieldSubset().get(0);
        assertEquals("radiance",field.getIdentifier().getValue());
        assertEquals(null,field.getInterpolationType());
        field = (FieldSubsetType) rs.getFieldSubset().get(1);
        assertEquals("temperature", field.getIdentifier().getValue());
        assertEquals(null, field.getInterpolationType());
    }
View Full Code Here

            assertEquals("RangeSubset", e.getLocator());
        }
    }
   
    public void testInterpolation() throws Exception {
        RangeSubsetType rs = (RangeSubsetType) parser.parse("radiance:linear;temperature:nearest");
        assertNotNull(rs);
        assertEquals(2, rs.getFieldSubset().size());
        FieldSubsetType field = (FieldSubsetType) rs.getFieldSubset().get(0);
        assertEquals("radiance",field.getIdentifier().getValue());
        assertEquals("linear",field.getInterpolationType());
        field = (FieldSubsetType) rs.getFieldSubset().get(1);
        assertEquals("temperature", field.getIdentifier().getValue());
        assertEquals("nearest", field.getInterpolationType());
    }
View Full Code Here

        assertEquals("temperature", field.getIdentifier().getValue());
        assertEquals("nearest", field.getInterpolationType());
    }
   
    public void testAxisSingleKey() throws Exception {
        RangeSubsetType rs = (RangeSubsetType) parser.parse("radiance[bands[Red]]");
        assertNotNull(rs);
        assertEquals(1, rs.getFieldSubset().size());
        FieldSubsetType field = (FieldSubsetType) rs.getFieldSubset().get(0);
        assertEquals("radiance", field.getIdentifier().getValue());
        assertEquals(1, field.getAxisSubset().size());
        AxisSubsetType axis = (AxisSubsetType) field.getAxisSubset().get(0);
        assertEquals("bands", axis.getIdentifier());
        List keys = axis.getKey();
View Full Code Here

        assertEquals(1, keys.size());
        assertEquals("Red", keys.get(0));
    }
   
    public void testAxisKeys() throws Exception {
        RangeSubsetType rs = (RangeSubsetType) parser.parse("radiance[bands[Red,Green,Blue]]");
        assertNotNull(rs);
        assertEquals(1, rs.getFieldSubset().size());
        FieldSubsetType field = (FieldSubsetType) rs.getFieldSubset().get(0);
        assertEquals("radiance", field.getIdentifier().getValue());
        assertEquals(1, field.getAxisSubset().size());
        AxisSubsetType axis = (AxisSubsetType) field.getAxisSubset().get(0);
        assertEquals("bands", axis.getIdentifier());
        List keys = axis.getKey();
View Full Code Here

    @Override
    public Object parse(String value) throws Exception {
        RangeSubsetParser parser = new RangeSubsetParser(new StringReader(value));
        SimpleNode root = parser.RangeSubset();
        RangeSubsetType result = (RangeSubsetType) root.jjtAccept(new RangeSubsetKvpParserVisitor(), null);
       
        for (Iterator it = result.getFieldSubset().iterator(); it.hasNext();) {
            FieldSubsetType type = (FieldSubsetType) it.next();
            String interpolationType = type.getInterpolationType();
            if(interpolationType != null) {
                try {
                    InterpolationMethod method = InterpolationMethod.valueOf(interpolationType);
View Full Code Here

        raw.put("format", "image/tiff");
        raw.put("BoundingBox", "-45,146,-42,147");
        raw.put("rangeSubset", "BlueMarble:" + interpolation + "[Bands[Red_band]]");

        GetCoverageType getCoverage = (GetCoverageType) reader.read(reader.createRequest(), parseKvp(raw), raw);
        RangeSubsetType rs = getCoverage.getRangeSubset();
        FieldSubsetType field = (FieldSubsetType) rs.getFieldSubset().get(0);
        AxisSubsetType axis = (AxisSubsetType) field.getAxisSubset().get(0);
        List keys = axis.getKey();

        assertNotNull(rs);
        assertEquals(1, rs.getFieldSubset().size());

        assertEquals("BlueMarble", field.getIdentifier().getValue());
        assertEquals(1, field.getAxisSubset().size());

        assertEquals("Bands", axis.getIdentifier());
View Full Code Here

TOP

Related Classes of net.opengis.wcs10.RangeSubsetType

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.