2
** libproj -- library of cartographic projections
4
** Copyright (c) 2006 Gerald I. Evenden
9
** Permission is hereby granted, free of charge, to any person obtaining
10
** a copy of this software and associated documentation files (the
11
** "Software"), to deal in the Software without restriction, including
12
** without limitation the rights to use, copy, modify, merge, publish,
13
** distribute, sublicense, and/or sell copies of the Software, and to
14
** permit persons to whom the Software is furnished to do so, subject to
15
** the following conditions:
17
** The above copyright notice and this permission notice shall be
18
** included in all copies or substantial portions of the Software.
20
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32
double /* isometric latitude */
33
proj_psi(double phi, double sphi, double e) {
34
double esp = e * sphi;
36
return log(tan(FORTPI + 0.5 * phi) * pow((1. - esp)/(1. + esp), 0.5 * e));
38
double /* inverse isometric latitude */
39
proj_apsi(double psi, double e) {
40
double esp, phi, phi0, he = e * 0.5, exp_psi = exp(psi);
44
phi0 = 2. * atan(exp_psi) - HALFPI;
47
phi = 2. * atan(pow((1. + esp)/(1. - esp), he) * exp_psi) - HALFPI;
49
} while ((fabs(phi0 - phi) > EPS) && --i);
55
** Revision 1.2 2008-11-14 16:56:33 jeff
56
** COMP: Fixing more libproj warnings.
58
** Revision 1.1 2008-11-07 16:41:15 jeff
59
** ENH: Adding a 2D geoview. Adding the geographic projection library libproj4
60
** to Utilities. Updating the architecture of the geospatial views. All
61
** multi-resolution sources are now subclasses of vtkGeoSource. Each source
62
** has its own worker thread for fetching refined images or geometry.
63
** On the 3D side, vtkGeoGlobeSource is an appropriate source for vtkGeoTerrain,
64
** and vtkGeoAlignedImageSource is an appropriate source for
65
** vtkGeoAlignedImageRepresentation. On the 2D side, vtkGeoProjectionSource is an
66
** appropriate source for vtkGeoTerrain2D, and the image source is the same.
68
** Revision 3.1 2006/06/19 01:00:26 gie