Package net.sf.eBusx.geo
Class BoundingBox
- java.lang.Object
-
- net.sf.eBus.messages.EMessageObject
-
- net.sf.eBus.messages.EField
-
- net.sf.eBusx.geo.BoundingBox
-
- All Implemented Interfaces:
java.io.Serializable
public final class BoundingBox extends EField
A bounding box (usually shortened to bbox) is an area defined by two longitudes and two latitudes, where:- Latitude is a decimal number between -90.0 and 90.0.
- Longitude is a decimal number between -180.0 and 180.0.
A bounding box is not an Open Street Map element and therefore has no associated unique identifier.
- Author:
- Charles W. Rapp
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBoundingBox.BuilderABuilderinstance is the only was to create aBoundingBoxinstance.
-
Field Summary
Fields Modifier and Type Field Description java.math.BigDecimalmaxLatitudeMaximum latitude sets the northern east-west boundary.java.math.BigDecimalmaxLongitudeMinimum longitude sets the eastern north-south boundary.java.math.BigDecimalminLatitudeMinimum latitude sets the southern east-west boundary.java.math.BigDecimalminLongitudeMinimum longitude sets the western north-south boundary.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BoundingBox.Builderbuilder()Returns a new bounding box builder instance.booleanequals(java.lang.Object o)inthashCode()java.lang.StringtoString()Returns text containing the four bounding box positions.
-
-
-
Field Detail
-
minLatitude
public final java.math.BigDecimal minLatitude
Minimum latitude sets the southern east-west boundary.
-
maxLatitude
public final java.math.BigDecimal maxLatitude
Maximum latitude sets the northern east-west boundary.
-
minLongitude
public final java.math.BigDecimal minLongitude
Minimum longitude sets the western north-south boundary.
-
maxLongitude
public final java.math.BigDecimal maxLongitude
Minimum longitude sets the eastern north-south boundary.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
Returns text containing the four bounding box positions.- Overrides:
toStringin classjava.lang.Object- Returns:
- bounding box textual representation.
-
builder
public static BoundingBox.Builder builder()
Returns a new bounding box builder instance. It is recommended that a new builder instance be used to create a new bounding box and that builders should not be re-used.- Returns:
- bounding box builder instance.
-
-