Package mil.nga.sf
Class GeometryEnvelope
- java.lang.Object
-
- mil.nga.sf.GeometryEnvelope
-
- All Implemented Interfaces:
Serializable
public class GeometryEnvelope extends Object implements Serializable
Geometry envelope- Author:
- osbornb
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GeometryEnvelope()
ConstructorGeometryEnvelope(boolean hasZ, boolean hasM)
ConstructorGeometryEnvelope(double minX, double minY, double maxX, double maxY)
ConstructorGeometryEnvelope(double minX, double minY, Double minZ, double maxX, double maxY, Double maxZ)
ConstructorGeometryEnvelope(double minX, double minY, Double minZ, Double minM, double maxX, double maxY, Double maxZ, Double maxM)
ConstructorGeometryEnvelope(GeometryEnvelope envelope)
Copy Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Geometry
buildGeometry()
Build a geometry representation of the geometry envelopeboolean
contains(double x, double y)
Determine if contains the coordinateboolean
contains(double x, double y, double epsilon)
Determine if contains the coordinateboolean
contains(GeometryEnvelope envelope)
Determine if inclusively contains the provided envelopeboolean
contains(GeometryEnvelope envelope, double epsilon)
Determine if inclusively contains the provided envelopeboolean
contains(Point point)
Determine if contains the pointboolean
contains(Point point, double epsilon)
Determine if contains the pointGeometryEnvelope
copy()
Copy the geometry envelopeboolean
equals(Object obj)
Line
getBottom()
Get the bottom linePoint
getBottomLeft()
Get the bottom left pointPoint
getBottomMid()
Get the bottom mid pointPoint
getBottomRight()
Get the bottom right pointPoint
getCentroid()
Get the envelope centroid pointLine
getLeft()
Get the left linePoint
getLeftMid()
Get the left mid pointDouble
getMaxM()
Get max mdouble
getMaxX()
Get max xdouble
getMaxY()
Get max yDouble
getMaxZ()
Get max zdouble
getMidX()
Get the envelope mid xdouble
getMidY()
Get the envelope mid yDouble
getMinM()
Get min mdouble
getMinX()
Get min xdouble
getMinY()
Get min yDouble
getMinZ()
Get min zDouble
getMRange()
Get the m rangeLine
getRight()
Get the right linePoint
getRightMid()
Get the right mid pointLine
getTop()
Get the top linePoint
getTopLeft()
Get the top left pointPoint
getTopMid()
Get the top mid pointPoint
getTopRight()
Get the top right pointdouble
getXRange()
Get the x rangedouble
getYRange()
Get the y rangeDouble
getZRange()
Get the z rangeint
hashCode()
boolean
hasM()
True if has M measurementsboolean
hasZ()
True if has Z coordinatesboolean
intersects(GeometryEnvelope envelope)
Determine if intersects with the provided envelopeboolean
intersects(GeometryEnvelope envelope, boolean allowEmpty)
Determine if intersects with the provided envelopeboolean
is3D()
True if has Z coordinatesboolean
isEmpty()
Determine if the envelope is emptyboolean
isHasM()
Has m coordinatesboolean
isHasZ()
Has z coordinatesboolean
isMeasured()
True if has M measurementsboolean
isPoint()
Determine if the envelope is of a single pointGeometryEnvelope
overlap(GeometryEnvelope envelope)
Get the overlapping geometry envelope with the provided envelopeGeometryEnvelope
overlap(GeometryEnvelope envelope, boolean allowEmpty)
Get the overlapping geometry envelope with the provided envelopevoid
setHasM(boolean hasM)
Set has m coordinatesvoid
setHasZ(boolean hasZ)
Set has z coordinatesvoid
setMaxM(Double maxM)
Set max mvoid
setMaxX(double maxX)
Set max xvoid
setMaxY(double maxY)
Set max yvoid
setMaxZ(Double maxZ)
Set max zvoid
setMinM(Double minM)
Set min mvoid
setMinX(double minX)
Set min xvoid
setMinY(double minY)
Set min yvoid
setMinZ(Double minZ)
Set min zGeometryEnvelope
union(GeometryEnvelope envelope)
Get the union geometry envelope combined with the provided envelope
-
-
-
Constructor Detail
-
GeometryEnvelope
public GeometryEnvelope()
Constructor
-
GeometryEnvelope
public GeometryEnvelope(boolean hasZ, boolean hasM)
Constructor- Parameters:
hasZ
- has zhasM
- has m
-
GeometryEnvelope
public GeometryEnvelope(double minX, double minY, double maxX, double maxY)
Constructor- Parameters:
minX
- min xminY
- min ymaxX
- max xmaxY
- max y
-
GeometryEnvelope
public GeometryEnvelope(double minX, double minY, Double minZ, double maxX, double maxY, Double maxZ)
Constructor- Parameters:
minX
- min xminY
- min yminZ
- min zmaxX
- max xmaxY
- max ymaxZ
- 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 xminY
- min yminZ
- min zminM
- min mmaxX
- max xmaxY
- max ymaxZ
- max zmaxM
- 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 envelopeallowEmpty
- 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 envelopeallowEmpty
- 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
- pointepsilon
- 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 valuey
- 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 valuey
- y valueepsilon
- 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 envelopeepsilon
- 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
-
-