Package net.opengis.wcs10

Examples of net.opengis.wcs10.InterpolationMethodType


            if (bands != null) {
                if (bands.contains("/")) {
                    List<String> unparsed = KvpUtils.readFlat(bands, new Tokenizer("/"));

                    IntervalType interval = Wcs10Factory.eINSTANCE.createIntervalType();
                    TypedLiteralType min = Wcs10Factory.eINSTANCE.createTypedLiteralType();
                    TypedLiteralType max = Wcs10Factory.eINSTANCE.createTypedLiteralType();
                    TypedLiteralType res = Wcs10Factory.eINSTANCE.createTypedLiteralType();
                    if (unparsed.size() == 2) {
                        min.setValue(unparsed.get(0));
                        max.setValue(unparsed.get(1));

                        interval.setMin(min);
                        interval.setMax(max);
                    } else {
                        min.setValue(unparsed.get(0));
                        max.setValue(unparsed.get(1));
                        res.setValue(unparsed.get(2));

                        interval.setMin(min);
                        interval.setMax(max);
                        interval.setRes(res);
                    }

                    final AxisSubsetType axisSubset = Wcs10Factory.eINSTANCE.createAxisSubsetType();

                    axisSubset.setName(axisName);

                    axisSubset.getInterval().add(interval);

                    rangeSubset.getAxisSubset().add(axisSubset);

                } else {
                    List<String> unparsed = KvpUtils.readFlat(bands, KvpUtils.INNER_DELIMETER);

                    if (unparsed.size() == 0) {
                        throw new WcsException(
                                "Requested axis subset contains wrong number of values (should have at least 1): "
                                        + unparsed.size(), WcsExceptionCode.InvalidParameterValue,
                                "band");
                    }

                    final AxisSubsetType axisSubset = Wcs10Factory.eINSTANCE.createAxisSubsetType();

                    axisSubset.setName(axisName);

                    for (String bandValue : unparsed) {
                        TypedLiteralType singleValue = Wcs10Factory.eINSTANCE.createTypedLiteralType();
                        singleValue.setValue(bandValue);

                        axisSubset.getSingleValue().add(singleValue);

                    }
                    rangeSubset.getAxisSubset().add(axisSubset);
                }
            }
        } else if (axis instanceof Double || axis instanceof Integer) {
            final AxisSubsetType axisSubset = Wcs10Factory.eINSTANCE.createAxisSubsetType();

            axisSubset.setName(axisName);

            TypedLiteralType singleValue = Wcs10Factory.eINSTANCE.createTypedLiteralType();
            singleValue.setValue(String.valueOf(axis));

            axisSubset.getSingleValue().add(singleValue);

            rangeSubset.getAxisSubset().add(axisSubset);
        }
View Full Code Here


        if (value.contains("/")) {
            List<String> unparsed = KvpUtils.readFlat(value, new Tokenizer("/"));

            IntervalType interval = Wcs10Factory.eINSTANCE.createIntervalType();
            TypedLiteralType min = Wcs10Factory.eINSTANCE.createTypedLiteralType();
            TypedLiteralType max = Wcs10Factory.eINSTANCE.createTypedLiteralType();
            TypedLiteralType res = Wcs10Factory.eINSTANCE.createTypedLiteralType();
            if (unparsed.size() == 2) {
                min.setValue(unparsed.get(0));
                max.setValue(unparsed.get(1));

                interval.setMin(min);
                interval.setMax(max);
            } else {
                min.setValue(unparsed.get(0));
                max.setValue(unparsed.get(1));
                res.setValue(unparsed.get(2));

                interval.setMin(min);
                interval.setMax(max);
                interval.setRes(res);
            }

            axisSubset.getInterval().add(interval);
        } else {
            List<String> unparsed = KvpUtils.readFlat(value, KvpUtils.INNER_DELIMETER);

            if (unparsed.size() == 0) {
                throw new WcsException(
                        "Requested axis subset contains wrong number of values (should have at least 1): "
                                + unparsed.size(), WcsExceptionCode.InvalidParameterValue, "band");
            }

            for (String bandValue : unparsed) {
                TypedLiteralType singleValue = Wcs10Factory.eINSTANCE.createTypedLiteralType();
                singleValue.setValue(bandValue);

                axisSubset.getSingleValue().add(singleValue);
            }
        }
View Full Code Here

   * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
   * @generated
   */
    public NotificationChain basicSetNullValues(ValueEnumType newNullValues, NotificationChain msgs) {
    ValueEnumType oldNullValues = nullValues;
    nullValues = newNullValues;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs10Package.RANGE_SET_TYPE__NULL_VALUES, oldNullValues, newNullValues);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

   * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
   * @generated
   */
    public NotificationChain basicSetValues(ValuesType newValues, NotificationChain msgs) {
    ValuesType oldValues = values;
    values = newValues;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs10Package.AXIS_DESCRIPTION_TYPE__VALUES, oldValues, newValues);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

   * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
   * @generated
   */
    public NotificationChain basicSetVendorSpecificCapabilities(VendorSpecificCapabilitiesType newVendorSpecificCapabilities, NotificationChain msgs) {
    VendorSpecificCapabilitiesType oldVendorSpecificCapabilities = vendorSpecificCapabilities;
    vendorSpecificCapabilities = newVendorSpecificCapabilities;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs10Package.WCS_CAPABILITY_TYPE__VENDOR_SPECIFIC_CAPABILITIES, oldVendorSpecificCapabilities, newVendorSpecificCapabilities);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

   * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
   * @generated
   */
    public NotificationChain basicSetCapability(WCSCapabilityType newCapability, NotificationChain msgs) {
    WCSCapabilityType oldCapability = capability;
    capability = newCapability;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs10Package.WCS_CAPABILITIES_TYPE__CAPABILITY, oldCapability, newCapability);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setInterpolationMethod(InterpolationMethodType newInterpolationMethod) {
        InterpolationMethodType oldInterpolationMethod = interpolationMethod;
        interpolationMethod = newInterpolationMethod;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, Wcs20Package.INTERPOLATION_TYPE__INTERPOLATION_METHOD, oldInterpolationMethod, interpolationMethod));
    }
View Full Code Here

       
        InterpolationType interpolation = (InterpolationType) extensions.get("http://www.opengis.net/WCS_service-extension_interpolation/1.0:Interpolation");
       
        assertNull(interpolation.getInterpolationAxes());
       
        InterpolationMethodType method = interpolation.getInterpolationMethod();
        assertEquals("http://www.opengis.net/def/interpolation/OGC/1/linear", method.getInterpolationMethod());
    }
View Full Code Here

        value = value.trim();

        // single value?
        if (value.matches("http://www.opengis.net/def/interpolation/OGC/1/[^,:]*")) {
            // single value then
            InterpolationMethodType method = Wcs20Factory.eINSTANCE.createInterpolationMethodType();
            method.setInterpolationMethod(value);
            result.setInterpolationMethod(method);
            return result;
        }

        // minimal validation of the multi-axis case
View Full Code Here

        // get interpolationType
        InterpolationType interpolationType = (InterpolationType) extensionItem
                .getObjectContent();
        // which type
        if (interpolationType.getInterpolationMethod() != null) {
            InterpolationMethodType method = interpolationType.getInterpolationMethod();
            InterpolationPolicy policy = InterpolationPolicy.getPolicy(method);
            for (String axisName : axesNames) {
                returnValue.put(axisName, policy);
            }
View Full Code Here

TOP

Related Classes of net.opengis.wcs10.InterpolationMethodType

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.