Class WithinPredicate

java.lang.Object
org.gbif.api.model.predicate.WithinPredicate
All Implemented Interfaces:
Serializable, Predicate

public class WithinPredicate extends Object implements Predicate
This predicate checks if an occurrence location falls within the given WKT geometry value.
See Also:
  • Constructor Details

    • WithinPredicate

      public WithinPredicate(String geometry)
      Builds a new within predicate for a single, simple geometry as Well Known Text (WKT). Multi geometries like MULTIPOLYGON are not supported and multiple predicates should be used instead.
      The validation implemented does a basic syntax check for the following simple geometries, but does not verify that the resulting geometries are topologically valid (see the OGC SFS specification).
      • POINT
      • LINESTRING
      • POLYGON
      • LINEARRING
      Unlike other predicates, this validation only logs in case of an invalid string. This is because the WKT parser has been changed over time, and some old strings are not valid according to the current parser.
      Parameters:
      geometry -
  • Method Details