summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/GeoConstants.java
blob: 0065140a8a187181fa7121ff94fcd5adbbd331cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.mapbox.mapboxsdk.geometry;

// TODO Remove this class if we finally include it within MAS 3.x (GeoJSON)
/**
 * GeoConstants exposes constants for doing locational calculations on Earth
 */
public class GeoConstants {

  /**
   * The <a href='http://en.wikipedia.org/wiki/Earth_radius#Equatorial_radius'>equatorial radius</a>
   * value in meters
   */
  public static final int RADIUS_EARTH_METERS = 6378137;

  /**
   * The minimum latitude on Earth. This is the minimum latitude representable
   * by Mapbox GL's Mercator projection, because the projection distorts latitude
   * near the poles towards infinity.
   */
  public static final double MIN_LATITUDE = -85.05112878;

  /**
   * The maximum latitude on Earth. This is the maximum latitude representable
   * by Mapbox GL's Mercator projection, because the projection distorts latitude
   * near the poles towards infinity.
   */
  public static final double MAX_LATITUDE = 85.05112878;

  /**
   * The minimum longitude on Earth
   */
  public static final double MIN_LONGITUDE = -180;

  /**
   * The maximum longitude on Earth
   */
  public static final double MAX_LONGITUDE = 180;

}