org.apache.lucene.spatial.tier.projections

## Class CartesianTierPlotter

- java.lang.Object
- - org.apache.lucene.spatial.tier.projections.CartesianTierPlotter

-     public class CartesianTierPlotter
      extends java.lang.Object

  NOTE: This API is still in flux and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DEFALT_FIELD_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CartesianTierPlotter(int tierLevel, IProjector projector, java.lang.String fieldPrefix)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `bestFit(double miles)` Find the tier with the best fit for a bounding box Best fit is defined as the ceiling of log2 (circumference of earth / distance) distance is defined as the smallest box fitting the corner between a radius and a bounding box.
    `double` | `getTierBoxId(double latitude, double longitude)` TierBoxId is latitude box id + longitude box id where latitude box id, and longitude box id are transposed in to position coordinates.
    `java.lang.String` | `getTierFieldName()` get the string name representing current tier _localTier<tiedId>
    `java.lang.String` | `getTierFieldName(int tierId)` get the string name representing tierId _localTier<tierId>
    `double` | `getTierVerticalPosDivider()`
    `double` | `log2(double value)` a log to the base 2 formula `Math.log(value) / Math.log(2)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFALT_FIELD_PREFIX

          public static final java.lang.String DEFALT_FIELD_PREFIX

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CartesianTierPlotter

          public CartesianTierPlotter(int tierLevel,
                                      IProjector projector,
                                      java.lang.String fieldPrefix)

  - ### Method Detail

    - #### getTierVerticalPosDivider

          public double getTierVerticalPosDivider()

    - #### getTierBoxId

          public double getTierBoxId(double latitude,
                                     double longitude)

      TierBoxId is latitude box id + longitude box id where latitude box id, and longitude box id are transposed in to position coordinates.
      Parameters:
        `latitude` -
        `longitude` -

    - #### getTierFieldName

          public java.lang.String getTierFieldName()

      get the string name representing current tier _localTier<tiedId>

    - #### getTierFieldName

          public java.lang.String getTierFieldName(int tierId)

      get the string name representing tierId _localTier<tierId>
      Parameters:
        `tierId` -

    - #### bestFit

          public int bestFit(double miles)

      Find the tier with the best fit for a bounding box Best fit is defined as the ceiling of log2 (circumference of earth / distance) distance is defined as the smallest box fitting the corner between a radius and a bounding box. Distances less than a mile return 15, finer granularity is in accurate

    - #### log2

          public double log2(double value)

      a log to the base 2 formula `Math.log(value) / Math.log(2)`
      Parameters:
        `value` -

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.