Package org.geotools.coverage.processing

Examples of org.geotools.coverage.processing.OperationJAI


            RasterSymbolizerHelper rsp = new RasterSymbolizerHelper(gc, null);
            rsp.visit(rs);
            GridCoverage2D recoloredGridCoverage = (GridCoverage2D) rsp.getOutput();

            final OperationJAI op = new OperationJAI("Histogram"); //$NON-NLS-1$
            ParameterValueGroup params = op.getParameters();
            params.parameter("Source").setValue(recoloredGridCoverage); //$NON-NLS-1$

            recoloredGridCoverage = (GridCoverage2D) op.doOperation(params, null);
            final Histogram h = (Histogram) recoloredGridCoverage.getProperty("histogram"); //$NON-NLS-1$

            Display.getDefault().asyncExec(new Runnable(){
                public void run() {
                    rgbViewer.updateHistograms(h.getBins());
View Full Code Here


        return null;
      }
     
    }
     
    final OperationJAI op = new OperationJAI("ZonalStats"); //$NON-NLS-1$
    ParameterValueGroup params = op.getParameters();
    params.parameter("dataImage").setValue(gcRaw); //$NON-NLS-1$
    params.parameter("stats").setValue(stats); //$NON-NLS-1$
    params.parameter("bands").setValue(new Integer[] { 0 }); //$NON-NLS-1$
    if (ignore.size() > 0){
      params.parameter("ranges").setValue(ignore); //$NON-NLS-1$
      params.parameter("rangesType").setValue(Range.Type.EXCLUDE); //$NON-NLS-1$
      params.parameter("rangeLocalStats").setValue(false); //$NON-NLS-1$
    }
   

    final GridCoverage2D coverage = (GridCoverage2D) op.doOperation(params,null);
    final ZonalStats zstats = (ZonalStats) coverage
        .getProperty(ZonalStatsDescriptor.ZONAL_STATS_PROPERTY);
    double min = zstats.statistic(Statistic.MIN).results().get(0).getValue();
    double max = zstats.statistic(Statistic.MAX).results().get(0).getValue();
    return new double[]{min,max};
View Full Code Here

                    }

                    final Statistic[] statistis = statisticsSet.toArray(new Statistic[statisticsSet
                            .size()]);

                    final OperationJAI op = new OperationJAI("ZonalStats");
                    ParameterValueGroup params = op.getParameters();
                    params.parameter("dataImage").setValue(cropped);
                    params.parameter("stats").setValue(statistis);
                    params.parameter("bands").setValue(bands);
                    params.parameter("roi").setValue(roi);
                    params.parameter("ranges").setValue(inclusionRanges);
                    params.parameter("rangesType").setValue(rangesType);
                    params.parameter("rangeLocalStats").setValue(isLocal);

                    final GridCoverage2D coverage = (GridCoverage2D) op.doOperation(params, null);
                    final ZonalStats stats = (ZonalStats) coverage
                            .getProperty(ZonalStatsDescriptor.ZONAL_STATS_PROPERTY);
                    final Map<Statistic, List<Result>> statsMap = new HashMap<Statistic, List<Result>>();
                    for (Statistic statistic : statistis) {
                        final List<Range> inclRanges = CollectionFactory.list();
View Full Code Here

TOP

Related Classes of org.geotools.coverage.processing.OperationJAI

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.