Class S2PointRegion

    • Constructor Detail

      • S2PointRegion

        public S2PointRegion()
      • S2PointRegion

        public S2PointRegion​(double x,
                             double y,
                             double z)
      • S2PointRegion

        public S2PointRegion​(S2Point point)
    • Method Detail

      • getPoint

        public S2Point getPoint()
      • getX

        public double getX()
      • getY

        public double getY()
      • getZ

        public double getZ()
      • toDegreesString

        public String toDegreesString()
      • hashCode

        public int hashCode()
        Calcualates hashcode based on stored coordinates. Since we want +0.0 and -0.0 to be treated the same, we ignore the sign of the coordinates.
        Overrides:
        hashCode in class Object
      • contains

        public boolean contains​(S2Cell cell)
        Description copied from interface: S2Region
        If this method returns true, the region completely contains the given cell. Otherwise, either the region does not contain the cell or the containment relationship could not be determined.
        Specified by:
        contains in interface S2Region
      • contains

        public boolean contains​(S2Point p)
        Description copied from interface: S2Region
        Returns true if and only if the given point is contained by the region. p is generally required to be unit length, although some subtypes may relax this restriction.
        Specified by:
        contains in interface S2Region
      • getCapBound

        public S2Cap getCapBound()
        Description copied from interface: S2Region
        Return a bounding spherical cap.
        Specified by:
        getCapBound in interface S2Region
      • mayIntersect

        public boolean mayIntersect​(S2Cell cell)
        Description copied from interface: S2Region
        If this method returns false, the region does not intersect the given cell. Otherwise, either region intersects the cell, or the intersection relationship could not be determined.
        Specified by:
        mayIntersect in interface S2Region