Package org.opengis.parameter

Examples of org.opengis.parameter.ParameterValueGroup


            @DescribeParameter(name = "xScale", description = "Scale factor along the x axis") double xScale,
            @DescribeParameter(name = "yScale", description = "Scale factor along the y axis") double yScale,
            @DescribeParameter(name = "xTranslate", description = "Offset along the x axis") double xTranslate,
            @DescribeParameter(name = "yTranslate", description = "Offset along the y axis") double yTranslate,
            @DescribeParameter(name = "interpolation", description = "Interpolation function to use.  Values are NEAREST, BILINEAR, BICUBIC2, BICUBIC", min = 0) Interpolation interpolation) throws IOException {
        final ParameterValueGroup param = SCALE.getParameters();
       
        param.parameter("Source").setValue(coverage);
        param.parameter("xScale").setValue(xScale);
        param.parameter("yScale").setValue(yScale);
        param.parameter("xTrans").setValue(Float.valueOf(0.0f));
        param.parameter("yTrans").setValue(Float.valueOf(0.0f));
        if(interpolation != null) {
            param.parameter("Interpolation").setValue(interpolation);
        }

        return (GridCoverage2D) PROCESSOR.doOperation(param);
    }
View Full Code Here


        // //
        //
        // Doing the Operation
        //
        // //
        final ParameterValueGroup param = MULTIPLY.getParameters();
        param.parameter("Source0").setValue(coverageA);
        param.parameter("Source1").setValue(coverageB);
        return (GridCoverage2D) PROCESSOR.doOperation(param);
    }
View Full Code Here

        // //
        //
        // Doing the Operation
        //
        // //
        final ParameterValueGroup param = BANDMERGE.getParameters();
        // //
        //
        // ROI extraction
        //
        // //
        Geometry geo = null;
        if (roi != null) {
            geo = roi;

            Object crsGeo = geo.getUserData();

            if (crsGeo != null && crsGeo instanceof CoordinateReferenceSystem) {
                CoordinateReferenceSystem geoCRS = (CoordinateReferenceSystem) crsGeo;
                GridCoverage2D cov = coverages.iterator().next();
                // CRS Check
                BaseCoverageAlgebraProcess.checkCompatibleCRS(geoCRS,
                        cov.getCoordinateReferenceSystem());
                // Setting of the ROI if present
                param.parameter(BandMerge.GEOMETRY).setValue(geo);
            } else {
                // Supposing that the Geometry has the same CRS of the Coverage
                param.parameter(BandMerge.GEOMETRY).setValue(geo);
            }
        }

        // Addition of all the Coverages as source
        param.parameter("sources").setValue(coverages);

        // Addition of the Transformation Choice parameter if present
        if (transformChoice != null && !transformChoice.isEmpty()) {
            param.parameter(BandMerge.TRANSFORM_CHOICE).setValue(transformChoice);
        }

        // Addition of the Index parameter to use by the Transformation Choice if present
        if (transformChoice != null && !transformChoice.isEmpty()) {
            param.parameter(BandMerge.COVERAGE_INDEX).setValue(index);
        }

        // Call the "BandMerge" operation
        return (GridCoverage2D) PROCESSOR.doOperation(param);
    }
View Full Code Here

        // //
        //
        // Parameters definition
        //
        // //
        final ParameterValueGroup param = BANDSELECT.getParameters();
        // Setting of the source
        param.parameter("Source").setValue(coverage);
        // Setting of the Sample Dimension
        param.parameter("SampleDimensions").setValue(sampleDims);
        // Setting of the Sample Dimension
        param.parameter("VisibleSampleDimension").setValue(visibleSampleDim);

        // Call the "BandSelect" operation
        return (GridCoverage2D) PROCESSOR.doOperation(param);
    }
View Full Code Here

        } else {
            roi = (GeometryCollection) cropShape;
        }

        // perform the crops
        final ParameterValueGroup param = CROP.getParameters();
        param.parameter("Source").setValue(coverage);
        param.parameter("Envelope").setValue(bounds);
        param.parameter("ROI").setValue(roi);

        return (GridCoverage2D) PROCESSOR.doOperation(param);
    }
View Full Code Here

    // writing parameters for png
    final Format writerFormat = wiWriter.getFormat();
   

    // setting write parameters
    final ParameterValueGroup params = writerFormat.getWriteParameters();
    params.parameter(WorldImageFormat.FORMAT.getName().toString())
        .setValue(format);
    final GeneralParameterValue[] gpv = { params
        .parameter(WorldImageFormat.FORMAT.getName().toString()) };
    // writing
    wiWriter.write(coverage, gpv);
        wiWriter.dispose();
View Full Code Here

            return null;
        }
        MapProjection mapProjection = CRS.getMapProjection(renderingEnvelope
                .getCoordinateReferenceSystem());
        if (mapProjection instanceof LambertAzimuthalEqualArea) {
            ParameterValueGroup params = mapProjection.getParameterValues();
            double latitudeOfCenter = params.parameter(
                    LambertAzimuthalEqualArea.Provider.LATITUDE_OF_CENTRE.getName().getCode()).doubleValue();
            double longitudeOfCenter = params.parameter(
                    LambertAzimuthalEqualArea.Provider.LONGITUDE_OF_CENTRE.getName().getCode()).doubleValue();
           
            ReferencedEnvelope validArea;
            if(latitudeOfCenter > 0) {
                validArea = new ReferencedEnvelope(-180, 180, 0, 90, DefaultGeographicCRS.WGS84);
View Full Code Here

      final GridCoverage2D coverage) {
    try {
      final GeographicCRS base = (GeographicCRS) coverage.getCoordinateReferenceSystem();
      final Ellipsoid ellipsoid = base.getDatum().getEllipsoid();
      final DefaultMathTransformFactory factory = new DefaultMathTransformFactory();
      final ParameterValueGroup parameters = factory.getDefaultParameters("Oblique_Stereographic");
      parameters.parameter("semi_major").setValue(ellipsoid.getSemiMajorAxis());
      parameters.parameter("semi_minor").setValue(ellipsoid.getSemiMinorAxis());
      parameters.parameter("central_meridian").setValue(5);
      parameters.parameter("latitude_of_origin").setValue(-5);
      final MathTransform mt;
      try {
        mt = factory.createParameterizedTransform(parameters);
      } catch (FactoryException exception) {
        fail(exception.getLocalizedMessage());
View Full Code Here

    /**
     * Tests the creation of the math transform from the factory.
     */
    public void testMathTransform() throws FactoryException, TransformException {
        final MathTransformFactory mtFactory = ReferencingFactoryFinder.getMathTransformFactory(null);
        final ParameterValueGroup p = mtFactory.getDefaultParameters("Earth gravitational model");
        final MathTransform mt = mtFactory.createParameterizedTransform(p);
        DirectPosition pos = new GeneralDirectPosition(new double[] {45, 45, 1000});
        pos = mt.transform(pos, pos);
        assertEquals45.000, pos.getOrdinate(0), 0.001);
        assertEquals45.000, pos.getOrdinate(1), 0.001);
View Full Code Here

    }

    // is it user defined?
    final Conversion conversionFromBase;
    String projectionName=null;
    final ParameterValueGroup parameters;
    final MathTransform transform;
    if (projUserDefined) {
      // A user defined projection is made up by
      // <ol>
      // <li>PCSCitationGeoKey (NAME)
View Full Code Here

TOP

Related Classes of org.opengis.parameter.ParameterValueGroup

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.