Package org.n52.shetland.util
Class ReferencedEnvelope
- java.lang.Object
-
- org.n52.shetland.util.ReferencedEnvelope
-
- All Implemented Interfaces:
Serializable
public class ReferencedEnvelope extends Object implements Serializable
Class for internal Envelope representation TODO should this class offer merging capabilities like SosEnvelope.expandTo(SosEnvelope) considering coordinate transformations?- Since:
- 1.0.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ReferencedEnvelope()ReferencedEnvelope(org.locationtech.jts.geom.Envelope envelope, int srid)constructorReferencedEnvelope(org.locationtech.jts.geom.Geometry geometry)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ReferencedEnvelopecopy()booleanequals(Object obj)voidexpandToInclude(org.locationtech.jts.geom.Envelope e)Expand this envelope to include the given envelope.voidexpandToInclude(ReferencedEnvelope e)Expand this envelope to include the given envelope.org.locationtech.jts.geom.CoordinategetCoordinate()org.locationtech.jts.geom.Coordinate[]getCoordinates()org.locationtech.jts.geom.EnvelopegetEnvelope()Get envelopedoublegetMaxX()doublegetMaxY()DoublegetMaxZ()MinMax<String>getMinMaxFromEnvelope()Creates the minimum and maximum values of this envelope in the default EPSG.doublegetMinX()doublegetMinY()DoublegetMinZ()intgetSrid()Get SRIDinthashCode()booleanis1D()static booleanisNotNullOrEmpty(ReferencedEnvelope envelope)Static method to check if an SosEnvelope is not null and is not emptybooleanisSetEnvelope()booleanisSetMinMaxZ()booleanisSetSrid()ReferencedEnvelopesetEnvelope(org.locationtech.jts.geom.Envelope envelope)Set envelopeReferencedEnvelopesetMaxZ(Double maxZ)ReferencedEnvelopesetMinZ(Double minZ)ReferencedEnvelopesetSrid(int srid)Set SRIDorg.locationtech.jts.geom.GeometrytoGeometry()StringtoString()
-
-
-
Constructor Detail
-
ReferencedEnvelope
public ReferencedEnvelope()
-
ReferencedEnvelope
public ReferencedEnvelope(org.locationtech.jts.geom.Geometry geometry)
-
ReferencedEnvelope
public ReferencedEnvelope(org.locationtech.jts.geom.Envelope envelope, int srid)constructor- Parameters:
envelope- JTS envelopesrid- SRID
-
-
Method Detail
-
getEnvelope
public org.locationtech.jts.geom.Envelope getEnvelope()
Get envelope- Returns:
- the envelope
-
expandToInclude
public void expandToInclude(org.locationtech.jts.geom.Envelope e)
Expand this envelope to include the given envelope.- Parameters:
e- the envelope (may benull)
-
expandToInclude
public void expandToInclude(ReferencedEnvelope e)
Expand this envelope to include the given envelope.- Parameters:
e- the envelope (may benull)
-
setEnvelope
public ReferencedEnvelope setEnvelope(org.locationtech.jts.geom.Envelope envelope)
Set envelope- Parameters:
envelope- the envelope to set- Returns:
this
-
getMinMaxFromEnvelope
public MinMax<String> getMinMaxFromEnvelope()
Creates the minimum and maximum values of this envelope in the default EPSG.- Returns:
- the
MinMaxdescribing the envelope
-
getSrid
public int getSrid()
Get SRID- Returns:
- the srid
-
isSetSrid
public boolean isSetSrid()
-
setSrid
public ReferencedEnvelope setSrid(int srid)
Set SRID- Parameters:
srid- the srid to set- Returns:
this
-
getMinZ
public Double getMinZ()
- Returns:
- the minZ
-
setMinZ
public ReferencedEnvelope setMinZ(Double minZ)
- Parameters:
minZ- the minZ to set
-
getMaxZ
public Double getMaxZ()
- Returns:
- the maxZ
-
setMaxZ
public ReferencedEnvelope setMaxZ(Double maxZ)
- Parameters:
maxZ- the maxZ to set
-
isSetMinMaxZ
public boolean isSetMinMaxZ()
-
isSetEnvelope
public boolean isSetEnvelope()
-
getMinX
public double getMinX()
-
getMaxX
public double getMaxX()
-
getMinY
public double getMinY()
-
getMaxY
public double getMaxY()
-
getCoordinates
public org.locationtech.jts.geom.Coordinate[] getCoordinates()
-
getCoordinate
public org.locationtech.jts.geom.Coordinate getCoordinate()
-
toGeometry
public org.locationtech.jts.geom.Geometry toGeometry()
-
is1D
public boolean is1D()
-
isNotNullOrEmpty
public static boolean isNotNullOrEmpty(ReferencedEnvelope envelope)
Static method to check if an SosEnvelope is not null and is not empty- Parameters:
envelope- SosEnvelope to check- Returns:
true, if SosEnvelope is not null and not empty.
-
copy
public ReferencedEnvelope copy()
-
-