diff options
| author | Frank Warmerdam <warmerdam@pobox.com> | 2010-03-16 12:44:36 +0000 |
|---|---|---|
| committer | Frank Warmerdam <warmerdam@pobox.com> | 2010-03-16 12:44:36 +0000 |
| commit | e4f028223c773d3d60c6e59e00653ff22e538c90 (patch) | |
| tree | ccb372db2f83167ac006f34c5a9892ef645d4669 /src/pj_init.c | |
| parent | 4ea16fcba0dd2e67c62488beeaddf8a93b49fdf7 (diff) | |
| download | PROJ-e4f028223c773d3d60c6e59e00653ff22e538c90.tar.gz PROJ-e4f028223c773d3d60c6e59e00653ff22e538c90.zip | |
Rework the translation of nadgrids parameters into a list of gridshift files
to avoid use of static "lastnadgrids" information which screws up
multithreading. Changes the PJ structure.
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1831 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'src/pj_init.c')
| -rw-r--r-- | src/pj_init.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pj_init.c b/src/pj_init.c index 9f336073..87d5ca8d 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -271,6 +271,8 @@ pj_init(int argc, char **argv) { PIN->is_long_wrap_set = 0; PIN->long_wrap_center = 0.0; strcpy( PIN->axis, "enu" ); + PIN->gridlist = NULL; + PIN->gridlist_count = 0; /* set datum parameters */ if (pj_datum_set(start, PIN)) goto bum_call; @@ -439,6 +441,10 @@ pj_free(PJ *P) { pj_dalloc(t); } + /* free array of grid pointers if we have one */ + if( P->gridlist != NULL ) + pj_dalloc( P->gridlist ); + /* free projection parameters */ P->pfree(P); } |
