Package net.opengis.wcs20

Examples of net.opengis.wcs20.ScalingType


                "&coverageId=theCoverage&scaleFactor=2");
       
        Map<String, Object> extensions = getExtensionsMap(gc);

        assertEquals(1, extensions.size());
        ScalingType scaling = (ScalingType) extensions.get(Scaling.NAMESPACE + ":Scaling");
        ScaleByFactorType sbf = scaling.getScaleByFactor();
        assertEquals(2.0, sbf.getScaleFactor(), 0d);
    }
View Full Code Here


                "&coverageId=theCoverage&scaleaxes=http://www.opengis.net/def/axis/OGC/1/i(3.5)," +
                "http://www.opengis.net/def/axis/OGC/1/j(5.0),http://www.opengis.net/def/axis/OGC/1/k(2.0)");
       
        Map<String, Object> extensions = getExtensionsMap(gc);
        assertEquals(1, extensions.size());
        ScalingType scaling = (ScalingType) extensions.get(Scaling.NAMESPACE + ":Scaling");
        ScaleAxisByFactorType sax = scaling.getScaleAxesByFactor();
        EList<ScaleAxisType> saxes = sax.getScaleAxis();
        assertEquals(3, saxes.size());
        assertEquals("http://www.opengis.net/def/axis/OGC/1/i", saxes.get(0).getAxis());
        assertEquals(3.5d, saxes.get(0).getScaleFactor(), 0d);
        assertEquals("http://www.opengis.net/def/axis/OGC/1/j", saxes.get(1).getAxis());
View Full Code Here

                "&coverageId=theCoverage&scalesize=http://www.opengis.net/def/axis/OGC/1/i(1000)," +
                "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());
View Full Code Here

                "&coverageId=theCoverage&scaleextent=http://www.opengis.net/def/axis/OGC/1/i(10,20),http://www.opengis.net/def/axis/OGC/1/j(20,30)");
       
        Map<String, Object> extensions = getExtensionsMap(gc);

        assertEquals(1, extensions.size());
        ScalingType scaling = (ScalingType) extensions.get(Scaling.NAMESPACE + ":Scaling");
        ScaleToExtentType ste = scaling.getScaleToExtent();
        assertEquals(2, ste.getTargetAxisExtent().size());
        TargetAxisExtentType tax = ste.getTargetAxisExtent().get(0);
        assertEquals("http://www.opengis.net/def/axis/OGC/1/i", tax.getAxis());
        assertEquals(10.0, tax.getLow(), 0d);       
        assertEquals(20.0, tax.getHigh(), 0d);
View Full Code Here

        // we setup the params to force the usage of imageread and to make it use
        // the right overview and so on
        // we really try to subset before reading with a grid geometry
        // we specify to work in streaming fashion
        // TODO elevation
        ScalingType scaling = extractScaling(extensions);
        coverages = readCoverage(helper, gridCoverageRequest, reader, hints,
                incrementalInputSize, scaling, preAppliedScale);
        GridSampleDimension[] sampleDimensions = collectDimensions(coverages);
        if (coverages == null || coverages.isEmpty()) {
            throw new IllegalStateException("Unable to read a coverage for the current request" + coverageType.toString());
View Full Code Here

        }
        return coverage;
    }

    private ScalingType extractScaling(Map<String, ExtensionItemType> extensions) {
        ScalingType scaling = null;
        // look for a scaling extension
        if (!(extensions == null || extensions.size() == 0 || !extensions.containsKey("Scaling"))) {
            final ExtensionItemType extensionItem = extensions.get("Scaling");
            assert extensionItem != null;
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public Section createSectionFromString(EDataType eDataType, String initialValue) {
        Section result = Section.get(initialValue);
        if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
        return result;
    }
View Full Code Here

        SectionsType owsSections = (SectionsType) kvp.get("sections");
        if(owsSections != null) {
            Sections sections = Wcs20Factory.eINSTANCE.createSections();
            for(Object o : owsSections.getSection()) {
                String sectionName = (String) o;
                Section section = Section.get(sectionName);
                if(section == null) {
                    throw new WCS20Exception("Invalid sections value " + sectionName + ", supported values are " + Arrays.asList(Section.values()),
                            OWSExceptionCode.InvalidParameterValue, "sections");
                }
                sections.getSection().add(section);
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetSections(Sections newSections, NotificationChain msgs) {
        Sections oldSections = sections;
        sections = newSections;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs20Package.DESCRIBE_EO_COVERAGE_SET_TYPE__SECTIONS, oldSections, newSections);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

   
    @Override
    public Object read(Object request, Map kvp, Map rawKvp) throws Exception {
        SectionsType owsSections = (SectionsType) kvp.get("sections");
        if(owsSections != null) {
            Sections sections = Wcs20Factory.eINSTANCE.createSections();
            for(Object o : owsSections.getSection()) {
                String sectionName = (String) o;
                Section section = Section.get(sectionName);
                if(section == null) {
                    throw new WCS20Exception("Invalid sections value " + sectionName + ", supported values are " + Arrays.asList(Section.values()),
                            OWSExceptionCode.InvalidParameterValue, "sections");
                }
                sections.getSection().add(section);
            }
            kvp.put("sections", sections);
        }
        // the kvp param is subset, the objet field is dimensionTrim....
        Object subset = kvp.get("subset");
View Full Code Here

TOP

Related Classes of net.opengis.wcs20.ScalingType

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.