Changes between Version 3 and Version 4 of RenderingOsmDataUbuntu


Ignore:
Timestamp:
Aug 9, 2011, 1:02:50 PM (13 years ago)
Author:
dmorissette
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RenderingOsmDataUbuntu

    v3 v4  
    7171  venv/bin/pip install https://github.com/olt/shapely_speedups/tarball/master
    7272}}}
    73  * If we wanted to use the release version of imposm then we'd run the following command, BUT WE DO NOT WANT THAT
    74 {{{
    75   # Do not run this command unless you plan to use the release verison of imposm
    76   #venv/bin/pip install imposm
    77 }}}
    78  * Instead we'll use a custom branch of imposm created by tbonfort that creates additional generalized tables for use with mapserver-utils:
     73 * IMPORTANT: We will use a custom branch of imposm created by tbonfort that creates additional generalized tables for use with mapserver-utils:
    7974{{{
    8075  hg clone https://bitbucket.org/tbonfort/imposm-tbonfort
    8176  vi imposm-tbonfort/imposm/defaultmapping.py
    8277... change proj to epsg:900913 (it is set to epsg:4326 bu default)
     78}}}
     79 * 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:
     80{{{
     81  # Do not run this command unless you plan to use the release version of imposm
     82  #venv/bin/pip install imposm
     83}}}
    8384
    84 }}}
     85 * 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.
     86
    8587== Create database ==
    8688
     
    109111== Load data using imposm ==
    110112
     113 * Relevant docs: http://imposm.org/docs/imposm/latest/tutorial.html
    111114 * Commands:
    112115{{{
     
    116119  ~/osm-demo/venv/bin/python imposm-tbonfort/imposm/app.py  --optimize -d osm
    117120}}}
     121 * Note: multiple .osm.pbf files can be loaded in separate commands using the --merge-cache argument.
     122
     123== Install mapserver-utils mapfile generator ==
     124
     125 * Website: http://code.google.com/p/mapserver-utils/
     126 * Check out the 'imposm-branch' from SVN:
     127{{{
     128  cd ~/osm-demo/
     129  svn checkout http://mapserver-utils.googlecode.com/svn/branches/imposm-branch/ mapserver-utils-svn-imposm
     130  cd mapserver-utils-svn-imposm
     131}}}
     132 * Update mapserver-utils's osm-base.map and Makefile as follows:
     133{{{
     134-------------------8<------------------------
     135Index: osmbase.map
     136===================================================================
     137--- osmbase.map (revision 83)
     138+++ osmbase.map (working copy)
     139@@ -7,6 +7,7 @@
     140 SIZE 800 800
     141 EXTENT 47586 1621243 1197769 2679357
     142 EXTENT 16805492 -4049385 16857351 -3975830
     143+EXTENT -20000000 -20000000 20000000 20000000
     144 UNITS OSM_UNITS
     145 IMAGECOLOR _ocean_clr0
     146 WEB
     147@@ -16,6 +17,8 @@
     148       "labelcache_map_edge_buffer" "-10"
     149       "wms_title" "osm france"
     150    END
     151+   IMAGEPATH "/tmp/ms_tmp/"
     152+   IMAGEURL "/ms_tmp/"
     153 END
     154 
     155 DEBUG _debug
     156Index: Makefile
     157===================================================================
     158--- Makefile    (revision 83)
     159+++ Makefile    (working copy)
     160@@ -1,11 +1,12 @@
     161-CPP=cpp
     162+CPP=cpp-4.4
     163 
     164 OSM_PREFIX=osm_new_
     165 OSM_SRID=4326
     166-OSM_UNITS=dd
     167+OSM_SRID=900913
     168+OSM_UNITS=meters
     169 OSM_WMS_SRS="EPSG:900913 EPSG:4326 EPSG:3857 EPSG:2154 EPSG:310642901 EPSG:4171 EPSG:310024802 EPSG:310915814 EPSG:310486805 EPSG:310702807 EPSG:310700806 EPSG:310547809 EPSG:310706808 EPSG:310642810 EPSG:310642801 EPSG:310642812 EPSG:310032811 EPSG:310642813 EPSG:2986"
     170-DEBUG=1
     171-LAYERDEBUG=1
     172+DEBUG=2
     173+LAYERDEBUG=2
     174 
     175 template=osmbase.map
     176
     177-------------------->8-----------------------
     178}}}
     179
     180 * Execute the mapserver-utils makefile to generate the mapfile. Note that the first time you run 'make' several large files will be downloaded (country boundaries, etc.). This will happen only the first time.
     181{{{
     182  cd ~/osm-demo/mapserver-utils-svn-imposm
     183  make
     184}}}
     185 * Create MapServer temp dirs (required by mapserv CGI for testing with openlayers template)
     186{{{
     187  mkdir /tmp/ms_tmp
     188  chmod 777 /tmp/ms_tmp
     189}}}
     190
     191 * Access your map online using MapServer's built-in template=openlayers mode:
     192{{{
     193http://yourserver.tld/cgi-bin/mapserv?map=/path/to/osm-demo/mapserver-utils-svn-imposm/osm.map&mode=browse&template=openlayers&layers=all
     194}}}