[Proj] PROJ.4 thread-safety (same player shoot again)

Frank Warmerdam fwarmerdam at gmail.com
Fri Feb 25 10:23:04 EST 2005

On Fri, 25 Feb 2005 15:48:08 +0100, Patrick Mézard <pmezard at gmail.com> wrote:
> On Fri, 25 Feb 2005 09:04:45 -0500, Frank Warmerdam
> I don't get it.
> Correct me if I am wrong. Datums are listed in pj_datums[]. This array
> is read-only. Other datums can be defined when calling pj_init, but
> they are added to the projection being defined, not to a global datum
> registry. So, as long as projPJ is used in a thread safe manner (one
> per thread at least, one for the whole program if they are const once
> defined) there is no problem with datum definitions.


Sorry, I wasn't clear.  It is specifically the grid shift files that get loaded.
So when doing a NAD27 to NAD83 conversion, the grid shift files
are cached in RAM and all loaded grid shift files are maintained in a
global static linked list.  Management of this linked list needs to be
> Now, another interesting question is : are projPJ structures modified
> by pj_transform/pj_fwd/pj_inv ? It seems that libproj4 does not change
> them. Does PROJ.4 leave them unmodified too ?

I think so, but as before I warn that there may be exceptions I am not 
currently thinking about, or am not aware of. 

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the Proj mailing list