Package net.opengis.wcs20

Examples of net.opengis.wcs20.ScaleToExtentType


        }
    }

    @Test
    public void testSingleAxis() throws Exception {
        ScaleToExtentType se = (ScaleToExtentType) parser.parse("axis(10,20)");
        assertEquals(1, se.getTargetAxisExtent().size());
        TargetAxisExtentType tax = se.getTargetAxisExtent().get(0);
        assertEquals("axis", tax.getAxis());
        assertEquals(10.0, tax.getLow(), 0d);
        assertEquals(20.0, tax.getHigh(), 0d);
    }
View Full Code Here


        assertEquals(20.0, tax.getHigh(), 0d);
    }

    @Test
    public void testSingleAxisSpaces() throws Exception {
        ScaleToExtentType se = (ScaleToExtentType) parser.parse(" axis ( 10 , 20 ) ");
        assertEquals(1, se.getTargetAxisExtent().size());
        TargetAxisExtentType tax = se.getTargetAxisExtent().get(0);
        assertEquals("axis", tax.getAxis());
        assertEquals(10.0, tax.getLow(), 0d);
        assertEquals(20.0, tax.getHigh(), 0d);
    }
View Full Code Here

        assertEquals(20.0, tax.getHigh(), 0d);
    }

    @Test
    public void testMultiAxis() throws Exception {
        ScaleToExtentType se = (ScaleToExtentType) parser.parse("a1(10,20),a2(30,40)");
        assertEquals(2, se.getTargetAxisExtent().size());
        TargetAxisExtentType tax = se.getTargetAxisExtent().get(0);
        assertEquals("a1", tax.getAxis());
        assertEquals(10.0, tax.getLow(), 0d);
        assertEquals(20.0, tax.getHigh(), 0d);
        tax = se.getTargetAxisExtent().get(1);
        assertEquals("a2", tax.getAxis());
        assertEquals(30.0, tax.getLow(), 0d);
        assertEquals(40.0, tax.getHigh(), 0d);
    }
View Full Code Here

        assertEquals(40.0, tax.getHigh(), 0d);
    }

    @Test
    public void testMultiAxisSpaces() throws Exception {
        ScaleToExtentType se = (ScaleToExtentType) parser.parse("a1( 10, 20)  , a2  ( 30 , 40  ) ");
        assertEquals(2, se.getTargetAxisExtent().size());
        TargetAxisExtentType tax = se.getTargetAxisExtent().get(0);
        assertEquals("a1", tax.getAxis());
        assertEquals(10.0, tax.getLow(), 0d);
        assertEquals(20.0, tax.getHigh(), 0d);
        tax = se.getTargetAxisExtent().get(1);
        assertEquals("a2", tax.getAxis());
        assertEquals(30.0, tax.getLow(), 0d);
        assertEquals(40.0, tax.getHigh(), 0d);
    }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setScaleToSize(ScaleToSizeType newScaleToSize) {
        ScaleToSizeType oldScaleToSize = scaleToSize;
        scaleToSize = newScaleToSize;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, Wcs20Package.SCALING_TYPE__SCALE_TO_SIZE, oldScaleToSize, scaleToSize));
    }
View Full Code Here

       
        assertNull(scaling.getScaleByFactor());
        assertNull(scaling.getScaleAxesByFactor());
        assertNull(scaling.getScaleToExtent());
       
        ScaleToSizeType sa = scaling.getScaleToSize();
        assertEquals(3, sa.getTargetAxisSize().size());
        TargetAxisSizeType sa1 = sa.getTargetAxisSize().get(0);
        assertEquals("http://www.opengis.net/def/axis/OGC/1/i", sa1.getAxis());
        assertEquals(1000.0, sa1.getTargetSize(), 1e-9);
        TargetAxisSizeType sa2 = sa.getTargetAxisSize().get(1);
        assertEquals("http://www.opengis.net/def/axis/OGC/1/j", sa2.getAxis());
        assertEquals(1000.0, sa2.getTargetSize(), 1e-9);
        TargetAxisSizeType sa3 = sa.getTargetAxisSize().get(2);
        assertEquals("http://www.opengis.net/def/axis/OGC/1/k", sa3.getAxis());
        assertEquals(10.0, sa3.getTargetSize(), 1e-9);
    }
View Full Code Here

        super("scalesize", ScaleToSizeType.class);
    }

    @Override
    public Object parse(String value) throws Exception {
        ScaleToSizeType sabf = Wcs20Factory.eINSTANCE.createScaleToSizeType();
       
        List<TargetAxisSizeType> items = parseItem(value);
        sabf.getTargetAxisSize().addAll(items);
       
        return sabf;
    }
View Full Code Here

                "http://www.opengis.net/def/axis/OGC/1/j(1000),http://www.opengis.net/def/axis/OGC/1/k(10)");
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
        ScalingType scaling = (ScalingType) extensions.get(Scaling.NAMESPACE + ":Scaling");
        ScaleToSizeType sts = scaling.getScaleToSize();
        EList<TargetAxisSizeType> scaleAxes = sts.getTargetAxisSize();
        assertEquals(3, scaleAxes.size());
        assertEquals("http://www.opengis.net/def/axis/OGC/1/i", scaleAxes.get(0).getAxis());
        assertEquals(1000d, scaleAxes.get(0).getTargetSize(), 0d);
        assertEquals("http://www.opengis.net/def/axis/OGC/1/j", scaleAxes.get(1).getAxis());
        assertEquals(1000d, scaleAxes.get(1).getTargetSize(), 0d);
View Full Code Here

                .getResourceAsStream(capRequestPath));
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
       
        ScalingType scaling = (ScalingType) extensions.get("http://www.opengis.net/WCS_service-extension_scaling/1.0:Scaling");
       
        assertNull(scaling.getScaleAxesByFactor());
        assertNull(scaling.getScaleToSize());
        assertNull(scaling.getScaleToExtent());
       
        ScaleByFactorType scaleByFactor = scaling.getScaleByFactor();
        assertEquals(2.5, scaleByFactor.getScaleFactor(), 1e-9d);
    }
View Full Code Here

                .getResourceAsStream(capRequestPath));
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
       
        ScalingType scaling = (ScalingType) extensions.get("http://www.opengis.net/WCS_service-extension_scaling/1.0:Scaling");
       
        assertNull(scaling.getScaleByFactor());
        assertNull(scaling.getScaleToSize());
        assertNull(scaling.getScaleToExtent());
       
        ScaleAxisByFactorType sa = scaling.getScaleAxesByFactor();
        assertEquals(3, sa.getScaleAxis().size());
        ScaleAxisType sa1 = sa.getScaleAxis().get(0);
        assertEquals("http://www.opengis.net/def/axis/OGC/1/i", sa1.getAxis());
        assertEquals(3.5, sa1.getScaleFactor(), 1e-9);
        ScaleAxisType sa2 = sa.getScaleAxis().get(1);
View Full Code Here

TOP

Related Classes of net.opengis.wcs20.ScaleToExtentType

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.