Statistics
| Revision:

gvsig-3d / 1.10 / trunk / libraries / libjni-proj4 / src / pj_geocent.c @ 72

History | View | Annotate | Download (2.21 KB)

1 5 jzarzoso
/******************************************************************************
2
 * $Id: pj_geocent.c,v 1.1 2002/12/14 20:13:21 warmerda Exp $
3
 *
4
 * Project:  PROJ.4
5
 * Purpose:  Stub projection for geocentric.  The transformation isn't
6
 *           really done here since this code is 2D.  The real transformation
7
 *           is handled by pj_transform.c.
8
 * Author:   Frank Warmerdam, warmerdam@pobox.com
9
 *
10
 ******************************************************************************
11
 * Copyright (c) 2002, Frank Warmerdam
12
 *
13
 * Permission is hereby granted, free of charge, to any person obtaining a
14
 * copy of this software and associated documentation files (the "Software"),
15
 * to deal in the Software without restriction, including without limitation
16
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17
 * and/or sell copies of the Software, and to permit persons to whom the
18
 * Software is furnished to do so, subject to the following conditions:
19
 *
20
 * The above copyright notice and this permission notice shall be included
21
 * in all copies or substantial portions of the Software.
22
 *
23
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29
 * DEALINGS IN THE SOFTWARE.
30
 ******************************************************************************
31
 *
32
 * $Log: pj_geocent.c,v $
33
 * Revision 1.1  2002/12/14 20:13:21  warmerda
34
 * New
35
 *
36
 */
37
38
#define PJ_LIB__
39
#include <projects.h>
40
41
PJ_CVSID("$Id: pj_geocent.c,v 1.1 2002/12/14 20:13:21 warmerda Exp $");
42
43
PROJ_HEAD(geocent, "Geocentric")  "\n\t";
44
45
FORWARD(forward);
46
        xy.x = lp.lam;
47
        xy.y = lp.phi;
48
        return xy;
49
}
50
INVERSE(inverse);
51
        lp.phi = xy.y;
52
        lp.lam = xy.x;
53
        return lp;
54
}
55
FREEUP; if (P) pj_dalloc(P); }
56
57
ENTRY0(geocent)
58
    P->is_geocent = 1;
59
    P->x0 = 0.0;
60
    P->y0 = 0.0;
61
    P->inv = inverse; P->fwd = forward;
62
ENDENTRY(P)