Tree [930b45] master /
History



File Date Author Commit
examples 2012-03-29 rsz rsz [c5881b] checker fx working; web aerial working; todo im...
sandbox 2012-04-14 rsz rsz [930b45] Added unit test framework. Added license. Added...
src 2012-04-14 rsz rsz [930b45] Added unit test framework. Added license. Added...
test 2012-04-14 rsz rsz [930b45] Added unit test framework. Added license. Added...
LICENSE 2012-04-14 rsz rsz [930b45] Added unit test framework. Added license. Added...
Makefile 2012-04-14 rsz rsz [930b45] Added unit test framework. Added license. Added...
Makefile.inc 2012-03-29 rsz rsz [c5881b] checker fx working; web aerial working; todo im...
readme.txt 2012-04-03 rsz rsz [f4fb5d] spatilite build instr

Read Me

# Todo
- image file source.
- mapnik source
- rasterlite setup

##########################################################
# Installation (short version)
Build and install libcurl.
Build and install jansson (c++ JSON library).
Build and install FreeImagePlus (c++ image library).
Build and install mapnik2 (depends on boost and gdal+tiff).
Make any changes in Makefile.inc.
make

##########################################################
# Installation (long version)

# Build latest libtiff for gdal.
cd /tmp
tiff=tiff-4.0.1
wget ftp://ftp.remotesensing.org/pub/libtiff/$tiff.tar.gz
tar zxvf $tiff.*gz
cd $tiff
./configure --prefix=/usr/local/$tiff
make
make check
sudo make install

# Build geos for gdal.
cd /tmp
geos=geos-3.3.2
wget http://download.osgeo.org/geos/$geos.tar.bz2
bzcat $geos.*bz2 | tar xv
cd $geos
./configure --enable-python --prefix=/usr/local/$geos
make
make check
sudo make install

# Install postgres.
sudo apt-get install postgresql-server-dev-8.4 postgresql-client-common 

# Build gdal with own geos and tiff libraries.
cd /tmp
gdal=gdal-1.9.0
wget http://download.osgeo.org/gdal/$gdal.tar.gz
tar zxvf $gdal.*gz
cd $gdal
./configure --prefix=/usr/local/$gdal --with-geos=/usr/local/$geos/bin/geos-config  --with-libtiff=/usr/local/$tiff --with-python
make
sudo make install

# Build recent boost.
cd /tmp
wget http://sourceforge.net/projects/boost/files/boost/1.49.0/boost_1_49_0.tar.bz2
bzcat boost*bz2 | tar xv
cd boost*
sh ./bootstrap.sh --prefix=/usr/local/boost_1_49_0
./b2 -j 4
sudo ./b2 install --prefix=/usr/local/boost_1_49_0

# Build libcurl.

# Build jansson.
cd /tmp
wget http://www.digip.org/jansson/releases/jansson-2.3.tar.bz2
bzcat jansson*bz2 | tar xv
cd jansson*
./configure 
make
make check
sudo make install

# Build freeimage and freeimageplus.
cd /tmp
wget http://downloads.sourceforge.net/project/freeimage/Source%20Distribution/3.15.3/FreeImage3153.zip
unzip FreeImage*zip
cd FreeImage*
make -j 2
make -f Makefile.fip
sudo make -f Makefile.fip install

# Build spatialite.
export CFLAGS='-I/usr/local/sqlite-autoconf-3071100/include -I/usr/local/geos-3.3.2/include -I/usr/local/freexl-1.0.0b/include'
export LDFLAGS='-L/usr/local/sqlite-autoconf-3071100/lib -L/usr/local/geos-3.3.2/lib -L/usr/local/freexl-1.0.0b/lib' 
export CPPFLAGS="$CFLAGS"
export CXXFLAGS="$CFLAGS"

./configure --prefix=/usr/local/libspatialite-3.0.1/

# Build mapnik2.
cd /tmp
git clone https://github.com/mapnik/mapnik.git
cd mapnik

BOOST=/usr/local/boost_1_49_0
GDAL=/usr/local/gdal-1.9.0
TIFF=/usr/local/tiff-4.0.1/
GEOS=/usr/local/geos-3.3.2/
python scons/scons.py configure CUSTOM_CXXFLAGS="-I$BOOST/include -I$GDAL/include -I$TIFF/include -I$GEOS/include" CUSTOM_LDFLAGS="-L$BOOST/lib -L$GDAL/lib -L$TIFF/lib -L$GEOS/lib" BOOST_INCLUDES=$BOOST/include BOOST_LIBS=$BOOST/lib GDAL_CONFIG=$GDAL/bin/gdal-config GEOS_CONFIG=$GEOS/bin/geos-config

python scons/scons.py FREETYPE-CONFIG=/usr/bin/freetype-config GDAL_CONFIG=/usr/local/gdal-1.9.0/bin/gdal-config GEOS_CONFIG=/usr/local/geos-3.3.2/bin/geos-config TIFF_LIBS=/usr/local/tiff-4.0.1/lib TIFF_INCLUDES=/usr/local/tiff-4.0.1/include BOOST_INCLUDES=/usr/local/boost_1_49_0/include BOOST_LIBS=/usr/local/boost_1_49_0/lib 

# Modify Makefile.inc if necessary.

# Build maketiles.

##########################################################
# Testing
export LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}"

src/maketiles -D 3 -c examples/ex1.json -t examples/tiles.nj.z8 -r 1,4,2 -f comp1

src/maketiles -D 3 -c examples/ex1.json -t examples/tiles.nj.z8 -r 1,4,2 naip-aerial