Class FastPointInPolygon

    • Constructor Detail

      • FastPointInPolygon

        public FastPointInPolygon​(P geom)
    • Method Detail

      • test

        public boolean test​(org.locationtech.jts.geom.Point point)
        Tests if the given bounding box is fully inside of the polygon.
        Specified by:
        test in interface Predicate<org.locationtech.jts.geom.Point>
      • crossingNumber

        protected int crossingNumber​(org.locationtech.jts.geom.Point point,
                                     boolean dir)
        ported from http://geomalgorithms.com/a03-_inclusion.html which is derived from https://wrf.ecse.rpi.edu//Research/Short_Notes/pnpoly.html
        Parameters:
        point - Point to be processed
        dir - boolean: true -> horizontal test, false -> vertical test
        Returns:
        crossing number of this point in the chosen direction, if the value is even the point is outside of the polygon, otherwise it is inside