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 class
BoundingBox.Builder
ABuilder
instance is the only was to create aBoundingBox
instance.
-
Field Summary
Fields Modifier and Type Field Description java.math.BigDecimal
maxLatitude
Maximum latitude sets the northern east-west boundary.java.math.BigDecimal
maxLongitude
Minimum longitude sets the eastern north-south boundary.java.math.BigDecimal
minLatitude
Minimum latitude sets the southern east-west boundary.java.math.BigDecimal
minLongitude
Minimum longitude sets the western north-south boundary.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BoundingBox.Builder
builder()
Returns a new bounding box builder instance.java.lang.String
toString()
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
-
toString
public java.lang.String toString()
Returns text containing the four bounding box positions.- Overrides:
toString
in 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.
-
-