User Tools

Site Tools


tutorials:tilemill

This is an old revision of the document!


Install Tilemill on Debian

dependencies

  • Mapnik v2.3.0
  • Node.js v0.10.x or v0.8.x
  • Protobuf: libprotobuf-lite and protoc
sudo aptitude install libprotobuf-lite7 libprotoc7

node-js

node-js installieren
am besten vom git-repository, da die debian-packages teilweise veraltet sind

git clone https://github.com/joyent/node.git
cd node
git checkout v0.10.21 #Try checking nodejs.org for what the stable version is
./configure && make
sudo make install

mapnik 2.3.x

install proj.4 for better threading support

# Or, install proj4 latest and then mapnik from source:
wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip
# we use trunk instead for better threading support
svn co http://svn.osgeo.org/metacrs/proj/trunk/proj proj-trunk # at the time pre-release 4.8.0
cd proj-trunk/nad
unzip -o ../../proj-datumgrid-1.5.zip
cd .. && ./configure
make
sudo make install

install latest boost-libraries from source:

wget http://mapnik.s3.amazonaws.com/deps/boost_1_54_0.tar.bz2
tar xjvf boost_1_54_0.tar.bz2
cd boost_1_54_0
./bootstrap.sh
./b2 stage toolset=gcc --with-thread --with-filesystem --with-python --with-regex -sHAVE_ICU=1 -sICU_PATH=/usr/ --with-program_options --with-system link=shared
sudo ./b2 install toolset=gcc --with-thread --with-filesystem --with-python --with-regex -sHAVE_ICU=1 -sICU_PATH=/usr/ --with-program_options --with-system link=shared -d0
sudo ldconfig && cd ../

link:

sudo aptitude install \
  g++ cpp \
  libicu-dev libicu48 \
  python-dev \
  libboost-system-dev \
  libboost-filesystem-dev \
  libboost-iostreams-dev \
  libboost-thread-dev \
  libboost-python-dev \
  libboost-program-options-dev \
  libboost-regex-dev \
  libxml2 libxml2-dev \
  libfreetype6 libfreetype6-dev \
  libjpeg8 libjpeg8-dev \
  libpng12-0 libpng12-dev \
  libtiff5 libtiff5-dev \
  libltdl7 libltdl-dev \
  libproj0 libproj-dev \
  libcairo2 libcairo2-dev python-cairo python-cairo-dev \
  libcairomm-1.0-1 libcairomm-1.0-dev \
  ttf-dejavu ttf-dejavu-core ttf-dejavu-extra ttf-unifont \
  postgresql postgresql-server-dev-9.1 postgresql-contrib \
  libgdal1-dev python-gdal \
  postgresql-9.1-postgis libsqlite3-dev  \
  subversion build-essential python-nose

mapnik:

wget http://mapnik.s3.amazonaws.com/dist/v2.2.0/mapnik-v2.2.0.tar.bz2
tar xf mapnik-v2.2.0.tar.bz2
cd mapnik-v2.2.0
./configure INPUT_PLUGINS=all # build with all plugins, see also: https://github.com/mapnik/mapnik/issues/1933
make 
sudo make install

test the installation

make test

reboot

Tilemill

Desktop windowing UI:

sudo aptitude install libwebkit-dev

in order to download tilemill:

sudo aptitude install git protobuf-compiler libprotobuf-lite7 libprotobuf-dev

download tilemill

TILEMILL_TAG="v0.10.1"
git clone https://github.com/mapbox/tilemill.git
cd tilemill
git checkout ${TILEMILL_TAG}
npm install

download data into postgis

sudo -u postgres createdb -U postgres tilemill_austria
sudo -u postgres createlang plpgsql tilemill_austria
sudo -u postgres psql tilemillmkdir src/tilemill-osm_austria -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
sudo -u postgres psql tilemill_austria -f /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql
sudo -u postgres createuser -Upostgres --no-superuser --no-createdb --no-createrole tilemill
sudo -u postgres psql -U postgres -c "ALTER ROLE tilemill WITH PASSWORD 'tilemill';"

# tabellen rechte fixen
sudo -u postgres psql tilemill_austria -c "ALTER TABLE geometry_columns OWNER TO tilemill";
sudo -u postgres psql tilemill_austria -c "ALTER TABLE spatial_ref_sys OWNER TO tilemill";
sudo -u postgres psql tilemill_austria -c "ALTER TABLE geography_columns OWNER TO tilemill";

# daten einspielen
mkdir src/tilemill-osm
cd src/tilemill-osm
wget http://download.geofabrik.de/europe/austria-latest.osm.pbf
osm2pgsql -d tilemill_austria --username tilemill --host localhost --password --slim austria-latest.osm.pbf
tutorials/tilemill.1383516954.txt.gz · Last modified: 2013/11/03 22:15 by nine