Last change
on this file since 1722 was 656, checked in by framm, 16 years ago |
- changes by Pieren <pieren3@…> to support Lambert projection
|
File size:
1.2 KB
|
Line | |
---|
1 | /*
|
---|
2 | * Import from fr.geo.convert package, a geographic coordinates converter.
|
---|
3 | * (http://www.i3s.unice.fr/~johan/gps/)
|
---|
4 | * License: GPL. For details, see LICENSE file.
|
---|
5 | * Copyright (C) 2002 Johan Montagnat (johan@creatis.insa-lyon.fr)
|
---|
6 | */
|
---|
7 |
|
---|
8 | package org.openstreetmap.josm.data.projection;
|
---|
9 |
|
---|
10 | /**
|
---|
11 | * the reference ellipsoids
|
---|
12 | */
|
---|
13 | class Ellipsoid {
|
---|
14 | /**
|
---|
15 | * Clarke's elipsoid (NTF system)
|
---|
16 | */
|
---|
17 | public static final Ellipsoid clarke = new Ellipsoid(6378249.2, 6356515.0);
|
---|
18 | /**
|
---|
19 | * Hayford's ellipsoid (ED50 system)
|
---|
20 | */
|
---|
21 | public static final Ellipsoid hayford =
|
---|
22 | new Ellipsoid(6378388.0, 6356911.9461);
|
---|
23 | /**
|
---|
24 | * WGS84 elipsoid
|
---|
25 | */
|
---|
26 | public static final Ellipsoid GRS80 = new Ellipsoid(6378137.0, 6356752.314);
|
---|
27 |
|
---|
28 | /**
|
---|
29 | * half long axis
|
---|
30 | */
|
---|
31 | public final double a;
|
---|
32 | /**
|
---|
33 | * half short axis
|
---|
34 | */
|
---|
35 | public final double b;
|
---|
36 | /**
|
---|
37 | * first excentricity
|
---|
38 | */
|
---|
39 | public final double e;
|
---|
40 | /**
|
---|
41 | * first excentricity squared
|
---|
42 | */
|
---|
43 | public final double e2;
|
---|
44 |
|
---|
45 | /**
|
---|
46 | * create a new ellipsoid and precompute its parameters
|
---|
47 | *
|
---|
48 | * @param a ellipsoid long axis (in meters)
|
---|
49 | * @param b ellipsoid short axis (in meters)
|
---|
50 | */
|
---|
51 | public Ellipsoid(double a, double b) {
|
---|
52 | this.a = a;
|
---|
53 | this.b = b;
|
---|
54 | e2 = (a*a - b*b) / (a*a);
|
---|
55 | e = Math.sqrt(e2);
|
---|
56 | }
|
---|
57 | }
|
---|
58 |
|
---|
59 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.