Refine search
@DescribeResult(name = "bounds", description = "Bounding box of input features") public ReferencedEnvelope execute( @DescribeParameter(name = "features", description = "Input feature collection") FeatureCollection features) { return features.getBounds(); } }
@DescribeResult(description = "Output feature collection") public SimpleFeatureCollection execute( @DescribeParameter(name = "first", description = "First feature collection") SimpleFeatureCollection firstFeatures, @DescribeParameter(name = "second", description = "Second feature collection") SimpleFeatureCollection secondFeatures) { return new IncludedFeatureCollection(firstFeatures, secondFeatures); }
@DescribeResult(name = "result", description = "Number of features") public Number execute( @DescribeParameter(name = "features", description = "Input feature collection") SimpleFeatureCollection features) throws Exception { return features.size(); } }
@DescribeProcess( title = "Intersection", description = "Returns a geometry representing the points that two geometries have in common. The result may be a heterogeneous geometry collection. If no intersection, returns an empty geometry." ) @DescribeResult(description = "Intersection of geometries") public static Geometry intersection( @DescribeParameter(name = "a", description = "First input geometry") Geometry a, @DescribeParameter(name = "b", description = "Second input geometry") Geometry b) { return a.intersection(b); }
@DescribeProcess( title = "Difference", description = "Returns a geometry representing the points that are contained in a geometry but not contained in a second geometry. The result may be a heterogeneous geometry collection." ) @DescribeResult(description = "Geometry representing the difference of the input geometries") public static Geometry difference( @DescribeParameter(name = "a", description = "First input geometry") Geometry a, @DescribeParameter(name = "b", description = "Second input geometry") Geometry b) { return a.difference(b); }
@DescribeProcess( title = "Polygon label process", description = "Calculate the Pole of accessibility, the most distant interior point in a polygon." ) @DescribeResult(description = "Pole of accessibility") public static Geometry PolyLabeller( @DescribeParameter(name = "polygon", description = "Input polygon") Geometry polygon, @DescribeParameter(name = "precision", description = "Tolerance") double tolerance) { return PolyLabeller.getPolylabel(polygon, tolerance); } }
@DescribeProcess(title = "Intersects Test", description = "Tests if two geometries intersect.") @DescribeResult(description = "True if the inputs intersect") public static boolean intersects( @DescribeParameter(name = "a", description = "First input geometry") Geometry a, @DescribeParameter(name = "b", description = "Second input geometry") Geometry b) { return a.intersects(b); }
@DescribeProcess( title = "Touches Test", description = "Tests if two geometries have at least one boundary point in common, but share no interior points." ) @DescribeResult(description = "True if the inputs touch") public static boolean touches( @DescribeParameter(name = "a", description = "First input geometry") Geometry a, @DescribeParameter(name = "b", description = "Second input geometry") Geometry b) { return a.touches(b); }
@DescribeProcess( title = "Distance", description = "Returns the minimum distance between two geometries. Measurement is given in the input units, so geographic coordinates are not recommended." ) @DescribeResult(description = "Distance between the two input geometries") public static double distance( @DescribeParameter(name = "a", description = "First input geometry") Geometry a, @DescribeParameter(name = "b", description = "Second input geometry") Geometry b) { return a.distance(b); }
@DescribeProcess( title = "Disjoint Test", description = "Tests if two geometries do not have any points in common." ) @DescribeResult(description = "True if the inputs are disjoint") public static boolean disjoint( @DescribeParameter(name = "a", description = "First input geometry") Geometry a, @DescribeParameter(name = "b", description = "Second input geometry") Geometry b) { return a.disjoint(b); }
@DescribeProcess( title = "Overlaps Test", description = "Tests if two geometries share some but not all interior points. Points or lines will always return False." ) @DescribeResult(description = "True if the inputs overlap") public static boolean overlaps( @DescribeParameter(name = "a", description = "First input geometry") Geometry a, @DescribeParameter(name = "b", description = "Second input geometry") Geometry b) { return a.overlaps(b); }
@DescribeProcess( title = "Exactly Equal Test", description = "Tests if two geometries are identical on a vertex-by-vertex basis." ) @DescribeResult(description = "True if the geometries are vertex-identical") public static boolean equalsExact( @DescribeParameter(name = "a", description = "First input geometry") Geometry a, @DescribeParameter(name = "b", description = "Second input geometry") Geometry b) { return a.equalsExact(b); }
@DescribeProcess( title = "Crosses Test", description = "Tests if two geometries have some, but not all, interior points in common." ) @DescribeResult(description = "True if the inputs cross") public static boolean crosses( @DescribeParameter(name = "a", description = "First input geometry") Geometry a, @DescribeParameter(name = "b", description = "Second input geometry") Geometry b) { return a.crosses(b); }
@DescribeProcess( title = "Within Test", description = "Tests if the first geometry is contained in the second geometry." ) @DescribeResult(description = "True if the first input is within the second input") public static boolean within( @DescribeParameter(name = "a", description = "First input geometry") Geometry a, @DescribeParameter(name = "b", description = "Second input geometry") Geometry b) { return a.within(b); }
@DescribeProcess( title = "Symmetric Difference", description = "Returns a geometry representing the points contained in either one of two geometries but not in both. The result may be a heterogeneous geometry collection." ) @DescribeResult(description = "Symmetric difference of the two geometries") public static Geometry symDifference( @DescribeParameter(name = "a", description = "First input geometry") Geometry a, @DescribeParameter(name = "b", description = "Second input geometry") Geometry b) { return a.symDifference(b); }
@DescribeProcess( title = "Nth Point", description = "Returns a point geometry equal to the Nth vertex in a geometry as determined by a given index. First vertex has index 0." ) @DescribeResult(description = "Vertex as point geometry") public static Point pointN( @DescribeParameter(name = "geom", description = "Input geometry") LineString line, @DescribeParameter(name = "index", description = "Index of vertex (0 is first)") int index) { return line.getPointN(index); }
@DescribeProcess( title = "Area", description = "Returns the area of a geometry, in the units of the geometry. Assumes a Cartesian plane, so this process is only recommended for non-geographic CRSes." ) @DescribeResult(description = "Area of the input geometry") public static double area( @DescribeParameter(name = "geom", description = "Input geometry") Geometry geom) { return geom.getArea(); }
@DescribeProcess( title = "Centroid", description = "Returns the geometric centroid of a geometry. Output is a single point. The centroid point may be located outside the geometry." ) @DescribeResult(description = "Centroid of the input geometry") public static Geometry centroid( @DescribeParameter(name = "geom", description = "Input geometry") Geometry geom) { return geom.getCentroid(); }
@DescribeProcess( title = "Closed Test", description = "Tests if the initial vertex equals the final vertex in a linear geometry. Points and polygons always return True." ) @DescribeResult(description = "True if the input is closed") public static boolean isClosed( @DescribeParameter(name = "geom", description = "Input geometry") LineString line) { return line.isClosed(); }
@DescribeProcess( title = "End Point", description = "Returns a point geometry equal to the final vertex of a LineString." ) @DescribeResult(description = "Final vertex as point geometry") public static Point endPoint( @DescribeParameter(name = "geom", description = "Input line") LineString line) { return line.getEndPoint(); }