Changeset 3396 for sandbox/camptocamp/mapfish_workshop_fossgis2010/printing_src/_build/html/creating_webservice.html
- Timestamp:
- 03/05/10 11:55:17 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
sandbox/camptocamp/mapfish_workshop_fossgis2010/printing_src/_build/html/creating_webservice.html
r3394 r3396 70 70 <div class="highlight-python"><pre>CREATE DATABASE mapfish_workshop TEMPLATE=postgis_template;</pre> 71 71 </div> 72 <p>Then, open the explorer, go into the <tt class="docutils literal"><span class="pre"> /home/live/mapfish/mapfish_workshop_fossgis2010/data</span></tt>72 <p>Then, open the explorer, go into the <tt class="docutils literal"><span class="pre">~/mapfish/mapfish_workshop_fossgis2010/data</span></tt> 73 73 folder and extract the <tt class="docutils literal"><span class="pre">countries.zip</span></tt> file. And enter the following commands 74 74 to import the <tt class="docutils literal"><span class="pre">countries</span></tt> Shapefile as a table named <tt class="docutils literal"><span class="pre">countries</span></tt> in the 75 75 <tt class="docutils literal"><span class="pre">mapfish_workshop</span></tt> database:</p> 76 <div class="highlight-python"><pre>cd /home/live/mapfish/mapfish_workshop_fossgis2010/data77 ~mapfish/mapfish_workshop_fossgis2010/data$shp2pgsql -s 4326 -I countries.shp countries | psql -d mapfish_workshop -U postgres</pre>76 <div class="highlight-python"><pre>cd ~/mapfish/mapfish_workshop_fossgis2010/data 77 shp2pgsql -s 4326 -I countries.shp countries | psql -d mapfish_workshop -U postgres</pre> 78 78 </div> 79 79 <p>You can start pgAdmin and connect to the <tt class="docutils literal"><span class="pre">mapfish_workshop</span></tt> database to check … … 88 88 </div> 89 89 <p>by this one:</p> 90 <div class="highlight-python"><pre>sqlalchemy.url = postgres://postgres:postgres@localhost:543 3/mapfish_workshop</pre>90 <div class="highlight-python"><pre>sqlalchemy.url = postgres://postgres:postgres@localhost:5432/mapfish_workshop</pre> 91 91 </div> 92 92 <p>The connection string specifies that the <tt class="docutils literal"><span class="pre">postgres</span></tt> driver must be used, the 93 database system listens on <tt class="docutils literal"><span class="pre">localhost</span></tt> and on <tt class="docutils literal"><span class="pre">port</span></tt> 543 3, and the name of94 the database is <tt class="docutils literal"><span class="pre">mapfish_workshop</span></tt>. (if it’s not working, test also with port 5432, which is the normal port)</p>93 database system listens on <tt class="docutils literal"><span class="pre">localhost</span></tt> and on <tt class="docutils literal"><span class="pre">port</span></tt> 5432, and the name of 94 the database is <tt class="docutils literal"><span class="pre">mapfish_workshop</span></tt>.</p> 95 95 </div> 96 96 <div class="section" id="creating-web-service"> … … 116 116 </li> 117 117 <li><p class="first">generate the web service code with the <tt class="docutils literal"><span class="pre">mf-layer</span></tt> command:</p> 118 <div class="highlight-python"><pre> <env> ~mapfish/MapFishApp>paster mf-layer countries</pre>118 <div class="highlight-python"><pre>(env) $ paster mf-layer countries</pre> 119 119 </div> 120 120 </li> … … 130 130 <p>If you killed <tt class="docutils literal"><span class="pre">paster</span> <span class="pre">serve</span></tt> or if you did not add the <tt class="docutils literal"><span class="pre">--reload</span></tt> switch, 131 131 restart <tt class="docutils literal"><span class="pre">MapFishApp</span></tt> with:</p> 132 <div class="highlight-python"><pre> <env> ~mapfish/MapFishApp>paster serve --reload development.ini</pre>132 <div class="highlight-python"><pre>(env) $ paster serve --reload development.ini</pre> 133 133 </div> 134 134 <p>You can now open <a class="reference external" href="http://localhost:5000/countries?limit=1">http://localhost:5000/countries?limit=1</a> in your browser, you … … 282 282 <div class="footer"> 283 283 © Copyright 2009, Ãric Lemoine, Cédric Moullet, François Van Der Biest. 284 Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6. 4.284 Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. 285 285 </div> 286 286 </body>
