Changes between Version 14 and Version 15 of RenderingOsmDataUbuntu


Ignore:
Timestamp:
Aug 12, 2011, 6:50:21 AM (13 years ago)
Author:
tbonfort
Comment:

remove usage of imposm branch, the master now creates the generalized tables. Also use "source venv/bin/activate" to avoid providing the full path to pip, python and imposm

Legend:

Unmodified
Added
Removed
Modified
  • RenderingOsmDataUbuntu

    v14 v15  
    6565  sudo apt-get install python-virtualenv
    6666  virtualenv venv
     67  source venv/bin/activate
    6768}}}
    6869 * Install shapely speedups:
    6970{{{
    7071  sudo apt-get install libgeos-dev
    71   venv/bin/pip install https://github.com/olt/shapely_speedups/tarball/master
    72 }}}
    73  * IMPORTANT: We will use a custom branch of imposm created by tbonfort that creates additional generalized tables for use with mapserver-utils:
    74 {{{
    75   hg clone https://bitbucket.org/tbonfort/imposm-tbonfort
    76   vi imposm-tbonfort/imposm/defaultmapping.py
    77 ... change proj to epsg:900913 (it is set to epsg:4326 by default)
    78 }}}
    79  * Install impost inside our python venv:
    80 {{{
    81   cd imposm-tbonfort/
    82   ~/osm-demo/venv/bin/python setup.py install
    83 }}}
    84  * If we wanted to use the release version of imposm instead then we'd have run the following command, BUT WE DO NOT WANT THAT... this command included here only for reference:
    85 {{{
    86   # Do not run this command unless you plan to use the release version of imposm
    87   #venv/bin/pip install imposm
    88 }}}
    89 
    90  * TODO: Verify if released version of imposm includes all required tables and views, and when it does update these instructions to avoid using the custom branch.
     72  pip install https://github.com/olt/shapely_speedups/tarball/master
     73}}}
     74 * Install imposm:
     75Note that up until recently imposm did not create the generalized tables used by the mapserver-utils mapfile. Since version 2.3.0 this is not the case anymore, so there is no need
     76to install a forked version of imposm as was the case in the first versions of this document
     77{{{
     78  pip install imposm
     79}}}
    9180
    9281== Create database ==
     
    9584 * Commands:
    9685{{{
    97   venv/bin/imposm-psqldb > create-db.sh
     86  imposm-psqldb > create-db.sh
    9887  vi ./create-db.sh # cross check if all path are set properly
    9988... edit the following lines:
     
    116105{{{
    117106  cd ~/osm-demo/
    118   ~/osm-demo/venv/bin/imposm --read alabama.osm.pbf
    119   ~/osm-demo/venv/bin/imposm --write --database osm --host localhost --user osm
     107  imposm --read alabama.osm.pbf
     108  imposm --write --database osm --host localhost --user osm
    120109  (... if prompted for db password, the default is osm)
    121   ~/osm-demo/venv/bin/python imposm-tbonfort/imposm/app.py  --optimize -d osm
     110  imposm  --optimize -d osm
    122111}}}
    123112 * Note: multiple .osm.pbf files can be loaded in separate commands using the --merge-cache argument.