[OSRS-PROJ] nad27->nad83 conversion error in nad2nad.exe
Frank Warmerdam
warmerdam at pobox.com
Fri Jun 1 09:29:31 EDT 2001
Boris Furman wrote:
> Platform independence is builtin. If I understood correctly on every given
> platform I need to compile and link my shared library and perform 'make
> install' into auxiliary .../proj4 directory that will become part of the
> library's distribution to be pointed by PROJ_LIB environment variable.
Boris,
If you are distributing this as a library, you might want to override how
pj_open_lib.c locates PROJ_LIB. Using an environment variable may be
cumbersome. If you are interested let me know and I will add a function
the application can call to set the PROJ_LIB location at runtime. This
would be useful in some of the environments I use PROJ as well.
> I think I need to build the shift tables out of the .lla files using the
> nad2bin executable on every platform. These shift tables are not platform
> independent. Is it correct?
Correct. The grid shift files are not platform independent. They are
byte order sensitive and also sensitive to structure packing alighnment
since some structures are dumped "whole" to the file. I would like to make
these binary files platform independent at some point in the future.
> Initially the proj library is not thread safe because of the emess_data
> static data instance.
Correct. The use of emess_data is not thread-safe. Furthermore, I
wouldn't trust the library to be fully re-entrant in other ways either.
Of course, if you protect all calls into the library at your higher level
api and capture error information within the protected session things
should be fine.
> I do not think that the library was intended for
> dynamic linking either. I skip initializing emess_data instance outside of
> the library. Would it bring me any problems if I just do dat27->dat83
> conversion only? Are there more not thread safe places in the source code
> that I should look at?
I am not sure I follow this. It is true that PROJ.4 wasn't originally
conceived as a shared library, but I have been using this way for some time.
The emess_dat structure is initialized by emess.h in emess.o. Further
initialization should only be necessary if you want to set the program name
or other parameters for more meaningful error messages. Am I missing
something here?
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
----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.
More information about the Proj
mailing list