[Proj] Redistributing Proj.dll

Frank Warmerdam warmerdam at pobox.com
Tue Feb 26 16:24:32 EST 2008


Mohammad Raza wrote:
> Hello,
> 
> What files and environment variables do I need to copy / configure if I
> am redistributing proj.dll with my application? In the readme.txt file
> it says that PROJ_LIB environment variable will still need to be set to
> enable use of initialization and datum grid shit files, what value do I
> give to this environment variable? Do I need to set any other
> environment variables? Is there any kind of documentation that anyone
> can guide me to?

M Raza,

The PROJ_LIB environment variable should contain the path to the directory
containing the initialization and grid shift files.   There are also
programmatic ways to set this if you are using PROJ from an application
and you don't want to do this via environment variables (see
pj_set_searchpath()).

The files you would need to distribute are normally found in the proj\nad
directory.  I think the Makefile.am pkgdata_DATA directory indicates what
is normally installed:

pkgdata_DATA = GL27 nad.lst nad27 nad83 proj_def.dat world epsg esri \
		esri.extra other.extra \
		IGNF ntf_r93.gsb

The above does not include the grid shift files which are normally
processed and installed via this rule:

install-data-local:
	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
	@if [ -f conus.lla ] ; then \
	  for x in *.lla ; do \
	    DEST=$(DESTDIR)$(pkgdatadir)/`basename $$x .lla`; \
	    echo "../src/nad2bin$(EXEEXT) $$DEST < $$x"; \
	    ../src/nad2bin$(EXEEXT) $$DEST < $$x ; \
	    if [ $$? -ne 0 ] ; then \
		echo "nad2bin$(EXEEXT) failed to install $$DEST"; \
		exit 1; \
	    fi; \
	  done; \
	else \
	  echo "nad2nad NADCON source files not present"; \
	fi
	@for gridfile in *.gsb ntv1_can.dat dummy ; do \
	  if test "$$gridfile" != "dummy" -a -f "$$gridfile" ; then \
	    echo $(INSTALL_DATA) $$gridfile $(DESTDIR)$(pkgdatadir)/$$gridfile; \
	    $(INSTALL_DATA) $$gridfile $(DESTDIR)$(pkgdatadir)/$$gridfile; \
           fi; \
	done

So basically the binary equivelents to all the .lla files, all .gsb files.
ntv1_can.dat and the file named dummy.

Note that PROJ can still do quite a bit without any of these files.  So whether
you need them depends on how you intend to use it.

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    | President OSGeo, http://osgeo.org



More information about the Proj mailing list