Class Filters

java.lang.Object
com.geodesk.feature.Filters

public class Filters extends Object
  • Constructor Details

    • Filters

      public Filters()
  • Method Details

    • within

      public static Filter within(Feature f)
    • within

      public static Filter within(Geometry geom)
    • within

      public static Filter within(PreparedGeometry prepared)
    • intersects

      public static Filter intersects(Feature f)
    • intersects

      public static Filter intersects(Geometry geom)
    • intersects

      public static Filter intersects(PreparedGeometry prepared)
    • crosses

      public static Filter crosses(Feature f)
    • connectedTo

      public static Filter connectedTo(Feature f)
      Creates a `Filter` that accept features that have at least one common node with the given `Feature`.
      Parameters:
      f - the `Feature` whose nodes to check against
      Returns:
    • connectedTo

      public static Filter connectedTo(Geometry geom)
      Creates a `Filter` that accept features that have at least one common vertex with the given `Geometry`. Coordinates of the `Geometry` are rounded to integers.
      Parameters:
      geom - the `Geometry` whose vertexes to check against
      Returns:
    • maxMetersFromXY

      public static Filter maxMetersFromXY(double distance, int x, int y)
      Creates a `Filter` that accept features whose closest point lies within a given radius.
      Parameters:
      distance - the maximum distance (in meters)
      x - the X coordinate of the center point
      y - the Y coordinate of the center point
      Returns:
    • maxMetersFromLonLat

      public static Filter maxMetersFromLonLat(double distance, double lon, double lat)
      Creates a `Filter` that accept features whose closest point lies within a given radius.
      Parameters:
      distance - the maximum distance (in meters)
      lon - the longitude of the center point
      lat - the latitude of the center point
      Returns:
    • maxMetersFrom

      public static Filter maxMetersFrom(double distance, Geometry geom)
      Creates a `Filter` that accept features that lie within a given distance from a `Geometry`. The Filter measures the distance between the closest points of the Geometry and the candidate Feature.
      Parameters:
      distance - the maximum distance (in meters)
      geom - the Geometry from which to measure
      Returns:
    • maxMetersFrom

      public static Filter maxMetersFrom(double distance, Feature feature)
      Creates a `Filter` that accept features that lie within a given distance from another `Feature`. The Filter measures the distance between the closest points of the features.
      Parameters:
      distance - the maximum distance (in meters)
      feature - the Feature from which to measure
      Returns:
    • containsLonLat

      public static Filter containsLonLat(double lon, double lat)