diff options
| author | Frank Warmerdam <warmerdam@pobox.com> | 2002-12-14 20:15:02 +0000 |
|---|---|---|
| committer | Frank Warmerdam <warmerdam@pobox.com> | 2002-12-14 20:15:02 +0000 |
| commit | e7133586d9a11058ae4f895f3aacd6f592b4e2d7 (patch) | |
| tree | f8ad17ebb868e95fed91f69d3b1c4381f2ebbc36 /src/pj_init.c | |
| parent | 68f1153940094c6e1451d2de873eb0b1c074254a (diff) | |
| download | PROJ-e7133586d9a11058ae4f895f3aacd6f592b4e2d7.tar.gz PROJ-e7133586d9a11058ae4f895f3aacd6f592b4e2d7.zip | |
added geocentric support, updated headers
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1053 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'src/pj_init.c')
| -rw-r--r-- | src/pj_init.c | 65 |
1 files changed, 56 insertions, 9 deletions
diff --git a/src/pj_init.c b/src/pj_init.c index 0078ea13..eb6ab77e 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -1,17 +1,55 @@ -/* projection initialization and closure */ -#ifndef lint -static const char SCCSID[]="@(#)pj_init.c 4.13 95/09/05 GIE REL"; -#endif +/****************************************************************************** + * $Id$ + * + * Project: PROJ.4 + * Purpose: Initialize projection object from string definition. Includes + * pj_init(), pj_init_plus() and pj_free() function. + * Author: Gerald Evenden, Frank Warmerdam <warmerdam@pobox.com> + * + ****************************************************************************** + * Copyright (c) 1995, Gerald Evenden + * Copyright (c) 2002, Frank Warmerdam <warmerdam@pobox.com> + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + ****************************************************************************** + * + * $Log$ + * Revision 1.9 2002/12/14 20:15:02 warmerda + * added geocentric support, updated headers + * + */ + #define PJ_LIB__ #include <projects.h> #include <stdio.h> #include <string.h> #include <errno.h> - static paralist -*start; + +PJ_CVSID("$Id$"); + +static paralist *start; extern FILE *pj_open_lib(char *, char *); - static paralist * +/************************************************************************/ +/* get_opt() */ +/************************************************************************/ +static paralist * get_opt(FILE *fid, char *name, paralist *next) { char sword[52], *word = sword+1; int first = 1, len, c; @@ -39,7 +77,11 @@ get_opt(FILE *fid, char *name, paralist *next) { errno = 0; return next; } - static paralist * + +/************************************************************************/ +/* get_defaults() */ +/************************************************************************/ +static paralist * get_defaults(paralist *next, char *name) { FILE *fid; @@ -53,7 +95,11 @@ get_defaults(paralist *next, char *name) { errno = 0; /* don't care if can't open file */ return next; } - static paralist * + +/************************************************************************/ +/* get_init() */ +/************************************************************************/ +static paralist * get_init(paralist *next, char *name) { char fname[MAX_PATH_FILENAME+ID_TAG_MAX+3], *opt; FILE *fid; @@ -181,6 +227,7 @@ pj_init(int argc, char **argv) { if (!(PIN = (*proj)(0))) goto bum_call; PIN->params = start; PIN->is_latlong = 0; + PIN->is_geocent = 0; /* set datum parameters */ if (pj_datum_set(start, PIN)) goto bum_call; |
