Package org.geoserver.wps.gs.AggregateProcess

Examples of org.geoserver.wps.gs.AggregateProcess.Results


                }

                // build the filter and gather the statistics
                Filter areaFilter = ff.within(ff.property(dataGeomName), ff.literal(zoneGeom));
                SimpleFeatureCollection zoneCollection = data.subCollection(areaFilter);
                Results stats = new AggregateProcess().execute(zoneCollection, dataAttribute,
                        FUNCTIONS, true, null);

                // build the resulting feature
                builder.addAll(zone.getAttributes());
                if(stats != null) {
                    builder.add(stats.getCount());
                    builder.add(stats.getMin());
                    builder.add(stats.getMax());
                    builder.add(stats.getSum());
                    builder.add(stats.getAverage());
                    builder.add(stats.getStandardDeviation());
                }
                return builder.buildFeature(zone.getID());
            } catch (Exception e) {
                throw new WPSException("Failed to compute statistics on feature " + zone, e);
            }
View Full Code Here

TOP

Related Classes of org.geoserver.wps.gs.AggregateProcess.Results

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.