Package mil.nga.sf

Class GeometryEnvelope

    • Constructor Detail

      • GeometryEnvelope

        public GeometryEnvelope()
        Constructor
      • GeometryEnvelope

        public GeometryEnvelope​(boolean hasZ,
                                boolean hasM)
        Constructor
        Parameters:
        hasZ - has z
        hasM - has m
      • GeometryEnvelope

        public GeometryEnvelope​(double minX,
                                double minY,
                                double maxX,
                                double maxY)
        Constructor
        Parameters:
        minX - min x
        minY - min y
        maxX - max x
        maxY - max y
      • GeometryEnvelope

        public GeometryEnvelope​(double minX,
                                double minY,
                                Double minZ,
                                double maxX,
                                double maxY,
                                Double maxZ)
        Constructor
        Parameters:
        minX - min x
        minY - min y
        minZ - min z
        maxX - max x
        maxY - max y
        maxZ - max z
      • GeometryEnvelope

        public GeometryEnvelope​(double minX,
                                double minY,
                                Double minZ,
                                Double minM,
                                double maxX,
                                double maxY,
                                Double maxZ,
                                Double maxM)
        Constructor
        Parameters:
        minX - min x
        minY - min y
        minZ - min z
        minM - min m
        maxX - max x
        maxY - max y
        maxZ - max z
        maxM - max m
      • GeometryEnvelope

        public GeometryEnvelope​(GeometryEnvelope envelope)
        Copy Constructor
        Parameters:
        envelope - Envelope to copy
    • Method Detail

      • hasZ

        public boolean hasZ()
        True if has Z coordinates
        Returns:
        has z
      • is3D

        public boolean is3D()
        True if has Z coordinates
        Returns:
        has z
        See Also:
        hasZ()
      • hasM

        public boolean hasM()
        True if has M measurements
        Returns:
        has m
      • isMeasured

        public boolean isMeasured()
        True if has M measurements
        Returns:
        has m
        See Also:
        hasM()
      • getMinX

        public double getMinX()
        Get min x
        Returns:
        min x
      • setMinX

        public void setMinX​(double minX)
        Set min x
        Parameters:
        minX - min x
      • getMaxX

        public double getMaxX()
        Get max x
        Returns:
        max x
      • setMaxX

        public void setMaxX​(double maxX)
        Set max x
        Parameters:
        maxX - max x
      • getMinY

        public double getMinY()
        Get min y
        Returns:
        min y
      • setMinY

        public void setMinY​(double minY)
        Set min y
        Parameters:
        minY - min y
      • getMaxY

        public double getMaxY()
        Get max y
        Returns:
        max y
      • setMaxY

        public void setMaxY​(double maxY)
        Set max y
        Parameters:
        maxY - max y
      • isHasZ

        public boolean isHasZ()
        Has z coordinates
        Returns:
        true if has z coordinates
      • setHasZ

        public void setHasZ​(boolean hasZ)
        Set has z coordinates
        Parameters:
        hasZ - has z
      • getMinZ

        public Double getMinZ()
        Get min z
        Returns:
        min z
      • setMinZ

        public void setMinZ​(Double minZ)
        Set min z
        Parameters:
        minZ - min z
      • getMaxZ

        public Double getMaxZ()
        Get max z
        Returns:
        max z
      • setMaxZ

        public void setMaxZ​(Double maxZ)
        Set max z
        Parameters:
        maxZ - max z
      • isHasM

        public boolean isHasM()
        Has m coordinates
        Returns:
        true if has m coordinates
      • setHasM

        public void setHasM​(boolean hasM)
        Set has m coordinates
        Parameters:
        hasM - has m
      • getMinM

        public Double getMinM()
        Get min m
        Returns:
        min m
      • setMinM

        public void setMinM​(Double minM)
        Set min m
        Parameters:
        minM - min m
      • getMaxM

        public Double getMaxM()
        Get max m
        Returns:
        max m
      • setMaxM

        public void setMaxM​(Double maxM)
        Set max m
        Parameters:
        maxM - max m
      • getXRange

        public double getXRange()
        Get the x range
        Returns:
        x range
        Since:
        2.0.5
      • getYRange

        public double getYRange()
        Get the y range
        Returns:
        y range
        Since:
        2.0.5
      • getZRange

        public Double getZRange()
        Get the z range
        Returns:
        z range
        Since:
        2.0.5
      • getMRange

        public Double getMRange()
        Get the m range
        Returns:
        m range
        Since:
        2.0.5
      • isPoint

        public boolean isPoint()
        Determine if the envelope is of a single point
        Returns:
        true if a single point bounds
        Since:
        2.0.5
      • getTopLeft

        public Point getTopLeft()
        Get the top left point
        Returns:
        top left point
        Since:
        2.2.0
      • getBottomLeft

        public Point getBottomLeft()
        Get the bottom left point
        Returns:
        bottom left point
        Since:
        2.2.0
      • getBottomRight

        public Point getBottomRight()
        Get the bottom right point
        Returns:
        bottom right point
        Since:
        2.2.0
      • getTopRight

        public Point getTopRight()
        Get the top right point
        Returns:
        top right point
        Since:
        2.2.0
      • getLeftMid

        public Point getLeftMid()
        Get the left mid point
        Returns:
        left mid point
        Since:
        2.2.2
      • getBottomMid

        public Point getBottomMid()
        Get the bottom mid point
        Returns:
        bottom mid point
        Since:
        2.2.2
      • getRightMid

        public Point getRightMid()
        Get the right mid point
        Returns:
        right mid point
        Since:
        2.2.2
      • getTopMid

        public Point getTopMid()
        Get the top mid point
        Returns:
        top mid point
        Since:
        2.2.2
      • getLeft

        public Line getLeft()
        Get the left line
        Returns:
        left line
        Since:
        2.2.0
      • getBottom

        public Line getBottom()
        Get the bottom line
        Returns:
        bottom line
        Since:
        2.2.0
      • getRight

        public Line getRight()
        Get the right line
        Returns:
        right line
        Since:
        2.2.0
      • getTop

        public Line getTop()
        Get the top line
        Returns:
        top line
        Since:
        2.2.0
      • getMidX

        public double getMidX()
        Get the envelope mid x
        Returns:
        mid x
        Since:
        2.1.0
      • getMidY

        public double getMidY()
        Get the envelope mid y
        Returns:
        mid y
        Since:
        2.1.0
      • getCentroid

        public Point getCentroid()
        Get the envelope centroid point
        Returns:
        centroid point
        Since:
        2.0.5
      • isEmpty

        public boolean isEmpty()
        Determine if the envelope is empty
        Returns:
        true if empty
        Since:
        2.1.0
      • intersects

        public boolean intersects​(GeometryEnvelope envelope)
        Determine if intersects with the provided envelope
        Parameters:
        envelope - geometry envelope
        Returns:
        true if intersects
        Since:
        2.0.1
      • intersects

        public boolean intersects​(GeometryEnvelope envelope,
                                  boolean allowEmpty)
        Determine if intersects with the provided envelope
        Parameters:
        envelope - geometry envelope
        allowEmpty - allow empty ranges when determining intersection
        Returns:
        true if intersects
        Since:
        2.0.1
      • overlap

        public GeometryEnvelope overlap​(GeometryEnvelope envelope)
        Get the overlapping geometry envelope with the provided envelope
        Parameters:
        envelope - geometry envelope
        Returns:
        geometry envelope
      • overlap

        public GeometryEnvelope overlap​(GeometryEnvelope envelope,
                                        boolean allowEmpty)
        Get the overlapping geometry envelope with the provided envelope
        Parameters:
        envelope - geometry envelope
        allowEmpty - allow empty ranges when determining intersection
        Returns:
        geometry envelope
        Since:
        2.0.1
      • union

        public GeometryEnvelope union​(GeometryEnvelope envelope)
        Get the union geometry envelope combined with the provided envelope
        Parameters:
        envelope - geometry envelope
        Returns:
        geometry envelope
      • contains

        public boolean contains​(Point point)
        Determine if contains the point
        Parameters:
        point - point
        Returns:
        true if contains
        Since:
        2.1.0
      • contains

        public boolean contains​(Point point,
                                double epsilon)
        Determine if contains the point
        Parameters:
        point - point
        epsilon - epsilon equality tolerance
        Returns:
        true if contains
        Since:
        2.2.0
      • contains

        public boolean contains​(double x,
                                double y)
        Determine if contains the coordinate
        Parameters:
        x - x value
        y - y value
        Returns:
        true if contains
        Since:
        2.1.0
      • contains

        public boolean contains​(double x,
                                double y,
                                double epsilon)
        Determine if contains the coordinate
        Parameters:
        x - x value
        y - y value
        epsilon - epsilon equality tolerance
        Returns:
        true if contains
        Since:
        2.2.0
      • contains

        public boolean contains​(GeometryEnvelope envelope)
        Determine if inclusively contains the provided envelope
        Parameters:
        envelope - geometry envelope
        Returns:
        true if contains
        Since:
        2.0.1
      • contains

        public boolean contains​(GeometryEnvelope envelope,
                                double epsilon)
        Determine if inclusively contains the provided envelope
        Parameters:
        envelope - geometry envelope
        epsilon - epsilon equality tolerance
        Returns:
        true if contains
        Since:
        2.2.0
      • buildGeometry

        public Geometry buildGeometry()
        Build a geometry representation of the geometry envelope
        Returns:
        geometry, polygon or point
        Since:
        2.0.5
      • copy

        public GeometryEnvelope copy()
        Copy the geometry envelope
        Returns:
        geometry envelope copy
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object