congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Rectangle.axisLat
Code IndexAdd Tabnine to your IDE (free)

How to use
axisLat
method
in
org.apache.lucene.geo.Rectangle

Best Java code snippets using org.apache.lucene.geo.Rectangle.axisLat (Showing top 4 results out of 315)

origin: org.apache.lucene/lucene-core

/** Create a predicate that checks whether points are within a distance of a given point.
 *  It works by computing the bounding box around the circle that is defined
 *  by the given points/distance and splitting it into between 1024 and 4096
 *  smaller boxes (4096*0.75^2=2304 on average). Then for each sub box, it
 *  computes the relation between this box and the distance query. Finally at
 *  search time, it first computes the sub box that the point belongs to,
 *  most of the time, no distance computation will need to be performed since
 *  all points from the sub box will either be in or out of the circle.
 *  @lucene.internal */
public static DistancePredicate createDistancePredicate(double lat, double lon, double radiusMeters) {
 final Rectangle boundingBox = Rectangle.fromPointDistance(lat, lon, radiusMeters);
 final double axisLat = Rectangle.axisLat(lat, radiusMeters);
 final double distanceSortKey = GeoUtils.distanceQuerySortKey(radiusMeters);
 final Function<Rectangle, Relation> boxToRelation = box -> GeoUtils.relate(
   box.minLat, box.maxLat, box.minLon, box.maxLon, lat, lon, distanceSortKey, axisLat);
 final Grid subBoxes = createSubBoxes(boundingBox, boxToRelation);
 return new DistancePredicate(
   subBoxes.latShift, subBoxes.lonShift,
   subBoxes.latBase, subBoxes.lonBase,
   subBoxes.maxLatDelta, subBoxes.maxLonDelta,
   subBoxes.relations,
   lat, lon, distanceSortKey);
}
origin: org.apache.lucene/lucene-core

final double axisLat = Rectangle.axisLat(latitude, radiusMeters);
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

/** Create a predicate that checks whether points are within a distance of a given point.
 *  It works by computing the bounding box around the circle that is defined
 *  by the given points/distance and splitting it into between 1024 and 4096
 *  smaller boxes (4096*0.75^2=2304 on average). Then for each sub box, it
 *  computes the relation between this box and the distance query. Finally at
 *  search time, it first computes the sub box that the point belongs to,
 *  most of the time, no distance computation will need to be performed since
 *  all points from the sub box will either be in or out of the circle.
 *  @lucene.internal */
public static DistancePredicate createDistancePredicate(double lat, double lon, double radiusMeters) {
 final Rectangle boundingBox = Rectangle.fromPointDistance(lat, lon, radiusMeters);
 final double axisLat = Rectangle.axisLat(lat, radiusMeters);
 final double distanceSortKey = GeoUtils.distanceQuerySortKey(radiusMeters);
 final Function<Rectangle, Relation> boxToRelation = box -> GeoUtils.relate(
   box.minLat, box.maxLat, box.minLon, box.maxLon, lat, lon, distanceSortKey, axisLat);
 final Grid subBoxes = createSubBoxes(boundingBox, boxToRelation);
 return new DistancePredicate(
   subBoxes.latShift, subBoxes.lonShift,
   subBoxes.latBase, subBoxes.lonBase,
   subBoxes.maxLatDelta, subBoxes.maxLonDelta,
   subBoxes.relations,
   lat, lon, distanceSortKey);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

final double axisLat = Rectangle.axisLat(latitude, radiusMeters);
org.apache.lucene.geoRectangleaxisLat

Javadoc

Calculate the latitude of a circle's intersections with its bbox meridians.

NOTE: the returned value will be +/- #AXISLAT_ERROR of the actual value.

Popular methods of Rectangle

  • <init>
    Constructs a bounding box by first validating the provided latitude and longitude coordinates
  • crossesDateline
    Returns true if this bounding box crosses the dateline
  • containsPoint
    returns true if rectangle (defined by minLat, maxLat, minLon, maxLon) contains the lat lon point
  • fromPointDistance
    Compute Bounding Box for a circle using WGS-84 parameters
  • fromPolygon
    Returns the bounding box over an array of polygons
  • equals

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • JList (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Table (org.hibernate.mapping)
    A relational table
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now