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 GeometrybuildGeometry()Build a geometry representation of the geometry envelopebooleancontains(double x, double y)Determine if contains the coordinatebooleancontains(GeometryEnvelope envelope)Determine if inclusively contains the provided envelopebooleancontains(Point point)Determine if contains the pointGeometryEnvelopecopy()Copy the geometry envelopebooleanequals(Object obj)PointgetCentroid()Get the envelope centroid pointDoublegetMaxM()Get max mdoublegetMaxX()Get max xdoublegetMaxY()Get max yDoublegetMaxZ()Get max zdoublegetMidX()Get the envelope mid xdoublegetMidY()Get the envelope mid yDoublegetMinM()Get min mdoublegetMinX()Get min xdoublegetMinY()Get min yDoublegetMinZ()Get min zDoublegetMRange()Get the m rangedoublegetXRange()Get the x rangedoublegetYRange()Get the y rangeDoublegetZRange()Get the z rangeinthashCode()booleanhasM()True if has M measurementsbooleanhasZ()True if has Z coordinatesbooleanintersects(GeometryEnvelope envelope)Determine if intersects with the provided envelopebooleanintersects(GeometryEnvelope envelope, boolean allowEmpty)Determine if intersects with the provided envelopebooleanis3D()True if has Z coordinatesbooleanisEmpty()Determine if the envelope is emptybooleanisHasM()Has m coordinatesbooleanisHasZ()Has z coordinatesbooleanisMeasured()True if has M measurementsbooleanisPoint()Determine if the envelope is of a single pointGeometryEnvelopeoverlap(GeometryEnvelope envelope)Get the overlapping geometry envelope with the provided envelopeGeometryEnvelopeoverlap(GeometryEnvelope envelope, boolean allowEmpty)Get the overlapping geometry envelope with the provided envelopevoidsetHasM(boolean hasM)Set has m coordinatesvoidsetHasZ(boolean hasZ)Set has z coordinatesvoidsetMaxM(Double maxM)Set max mvoidsetMaxX(double maxX)Set max xvoidsetMaxY(double maxY)Set max yvoidsetMaxZ(Double maxZ)Set max zvoidsetMinM(Double minM)Set min mvoidsetMinX(double minX)Set min xvoidsetMinY(double minY)Set min yvoidsetMinZ(Double minZ)Set min zGeometryEnvelopeunion(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
-
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(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(GeometryEnvelope envelope)
Determine if inclusively contains the provided envelope- Parameters:
envelope- geometry envelope- Returns:
- true if contains
- Since:
- 2.0.1
-
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
-
-