~ubuntu-branches/ubuntu/breezy/proj/breezy

« back to all changes in this revision

Viewing changes to src/PJ_aea.c

  • Committer: Bazaar Package Importer
  • Author(s): Peter S Galbraith
  • Date: 2004-11-06 19:44:53 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20041106194453-axnsmkh1zplal8mz
Tags: upstream-4.4.9
ImportĀ upstreamĀ versionĀ 4.4.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef lint
2
 
static const char SCCSID[]="@(#)PJ_aea.c        4.2     94/03/18        GIE     REL";
3
 
#endif
4
 
# define EPS10  1.e-10
5
 
# define TOL7   1.e-7
 
1
/******************************************************************************
 
2
 * $Id: PJ_aea.c,v 1.4 2003/08/18 15:21:23 warmerda Exp $
 
3
 *
 
4
 * Project:  PROJ.4
 
5
 * Purpose:  Implementation of the aea (Albers Equal Area) projection.
 
6
 * Author:   Gerald Evenden
 
7
 *
 
8
 ******************************************************************************
 
9
 * Copyright (c) 1995, Gerald Evenden
 
10
 *
 
11
 * Permission is hereby granted, free of charge, to any person obtaining a
 
12
 * copy of this software and associated documentation files (the "Software"),
 
13
 * to deal in the Software without restriction, including without limitation
 
14
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 
15
 * and/or sell copies of the Software, and to permit persons to whom the
 
16
 * Software is furnished to do so, subject to the following conditions:
 
17
 *
 
18
 * The above copyright notice and this permission notice shall be included
 
19
 * in all copies or substantial portions of the Software.
 
20
 *
 
21
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 
22
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
23
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 
24
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
25
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 
26
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 
27
 * DEALINGS IN THE SOFTWARE.
 
28
 ******************************************************************************
 
29
 *
 
30
 * $Log: PJ_aea.c,v $
 
31
 * Revision 1.4  2003/08/18 15:21:23  warmerda
 
32
 * fixed initialization of en variable
 
33
 *
 
34
 * Revision 1.3  2002/12/14 19:27:06  warmerda
 
35
 * updated header
 
36
 *
 
37
 */
 
38
 
6
39
#define PROJ_PARMS__ \
7
40
        double  ec; \
8
41
        double  n; \
15
48
        double  phi2; \
16
49
        double  *en; \
17
50
        int             ellips;
 
51
 
18
52
#define PJ_LIB__
19
 
# include       <projects.h>
 
53
#include <projects.h>
 
54
 
 
55
PJ_CVSID("$Id: PJ_aea.c,v 1.4 2003/08/18 15:21:23 warmerda Exp $");
 
56
 
 
57
# define EPS10  1.e-10
 
58
# define TOL7   1.e-7
 
59
 
20
60
PROJ_HEAD(aea, "Albers Equal Area")
21
61
        "\n\tConic Sph&Ell\n\tlat_1= lat_2=";
22
62
PROJ_HEAD(leac, "Lambert Equal Area Conic")
121
161
        P->inv = e_inverse; P->fwd = e_forward;
122
162
        return P;
123
163
}
124
 
ENTRY0(aea)
 
164
ENTRY1(aea,en)
125
165
        P->phi1 = pj_param(P->params, "rlat_1").f;
126
166
        P->phi2 = pj_param(P->params, "rlat_2").f;
127
167
ENDENTRY(setup(P))
128
 
ENTRY0(leac)
 
168
ENTRY1(leac,en)
129
169
        P->phi2 = pj_param(P->params, "rlat_1").f;
130
170
        P->phi1 = pj_param(P->params, "bsouth").i ? - HALFPI: HALFPI;
131
171
ENDENTRY(setup(P))