Class CoordCalculator

java.lang.Object
ca.uhn.fhir.jpa.util.CoordCalculator

public class CoordCalculator extends Object
Utility for calculating a symmetric GeoBoundingBox around a center point, ensuring each edge is at least the given distance in kilometers away.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.hibernate.search.engine.spatial.GeoBoundingBox
    getBox(double lat, double lon, double distanceKm)
    Computes a symmetric bounding box around the given latitude/longitude center, with each edge being at least the given distance in km away.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • getBox

      public static org.hibernate.search.engine.spatial.GeoBoundingBox getBox(double lat, double lon, double distanceKm)
      Computes a symmetric bounding box around the given latitude/longitude center, with each edge being at least the given distance in km away.
      Parameters:
      lat - center latitude
      lon - center longitude
      distanceKm - distance in kilometers from center to each edge
      Returns:
      GeoBoundingBox centered around the given coordinates