Skip navigation.
Home

PROJ.4 Cartographic Projections library installation

The PROJ.4 Cartographic Projections library was originally written by Gerald Evenden then of the USGS.

Download, extract, install.


cd /usr/local/src/PROJ
wget http://download.osgeo.org/proj/proj-4.9.1.tar.gz
tar xvf proj-4.9.1.tar.gz
cd proj-4.9.1
../config
make
make check
make install

The config file is a quick executable.


#!/bin/bash
./configure --prefix=/usr/local/$(basename $(pwd) | sed 's#-#/#')

Change to the appropriate modules directory, check for .desc and .version and .base, create a symblink to .base


cd /usr/local/Modules/modulefiles/proj
ln -s .base 4.9.1

The .base module takes the following form.


#%Module1.0#####################################################################
##
## $name modulefile
##
set ver [lrange [split [ module-info name ] / ] 1 1 ]
set name [lrange [split [ module-info name ] / ] 0 0 ]
set loading [module-info mode load]
set desc [join [read [ open "/usr/local/Modules/modulefiles/$name/.desc" ] ] ]
proc ModulesHelp { } {
puts stderr "\tThis module sets the envinronment for $name v$ver"
}
module-whatis "$desc (v$ver)"
#prepend-path --delim " " CPPFLAGS -I/usr/local/$name/$ver/include
#prepend-path --delim " " LDFLAGS -L/usr/local/$name/$ver/lib
#prepend-path LD_LIBRARY_PATH /usr/local/$name/$ver/lib
prepend-path MANPATH /usr/local/$name/$ver/man
prepend-path MANPATH /usr/local/$name/$ver/share/man
prepend-path PATH /usr/local/$name/$ver/bin