Class BoundingBox
- java.lang.Object
-
- org.linuxforhealth.fhir.search.location.bounding.Bounding
-
- org.linuxforhealth.fhir.search.location.bounding.BoundingBox
-
public class BoundingBox extends Bounding
The maximum number of BoundedBoxes for a single coordinate is 4.
lat = 90,-90, long = 180, -180 with any boundary the result is 4 Bounded Boxes.
The bounded boxes must adhere to the following constraints:
There are four points. Latitude: 90 to 0 to -90
Longitude: 180 to 0 -180
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBoundingBox.BuilderBuilds the BoundingBox.
-
Field Summary
Fields Modifier and Type Field Description java.lang.DoublemaxLatitudejava.lang.DoublemaxLongitudejava.lang.DoubleminLatitudejava.lang.DoubleminLongitude
-
Constructor Summary
Constructors Constructor Description BoundingBox()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BoundingBox.Builderbuilder()java.util.List<java.lang.Double>getDataPoints()gets the coordinates in an ordered listjava.lang.DoublegetMaxLatitude()java.lang.DoublegetMaxLongitude()java.lang.DoublegetMinLatitude()java.lang.DoublegetMinLongitude()BoundingTypegetType()returns the bounding type - radius or box.protected voidsetMaxLatitude(java.lang.Double maxLatitude)protected voidsetMaxLongitude(java.lang.Double maxLongitude)protected voidsetMinLatitude(java.lang.Double minLatitude)protected voidsetMinLongitude(java.lang.Double minLongitude)java.lang.StringtoString()voidvalidate()validates the Longitude and Latitude is valid for the Bounding area.-
Methods inherited from class org.linuxforhealth.fhir.search.location.bounding.Bounding
instance, setInstance
-
-
-
-
Method Detail
-
getMinLatitude
public java.lang.Double getMinLatitude()
-
getMaxLatitude
public java.lang.Double getMaxLatitude()
-
getMinLongitude
public java.lang.Double getMinLongitude()
-
getMaxLongitude
public java.lang.Double getMaxLongitude()
-
setMinLatitude
protected void setMinLatitude(java.lang.Double minLatitude)
-
setMaxLatitude
protected void setMaxLatitude(java.lang.Double maxLatitude)
-
setMinLongitude
protected void setMinLongitude(java.lang.Double minLongitude)
-
setMaxLongitude
protected void setMaxLongitude(java.lang.Double maxLongitude)
-
validate
public void validate()
Description copied from class:Boundingvalidates the Longitude and Latitude is valid for the Bounding area.
-
getDataPoints
public java.util.List<java.lang.Double> getDataPoints()
Description copied from class:Boundinggets the coordinates in an ordered list- Specified by:
getDataPointsin classBounding- Returns:
-
getType
public BoundingType getType()
Description copied from class:Boundingreturns the bounding type - radius or box.
-
builder
public static BoundingBox.Builder builder()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-