Changeset 3396 for sandbox/camptocamp/mapfish_workshop_fossgis2010/printing_src/_build/html/_sources/creating_webservice.txt
- 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/_sources/creating_webservice.txt
r3394 r3396 31 31 CREATE DATABASE mapfish_workshop TEMPLATE=postgis_template; 32 32 33 Then, open the explorer, go into the `` /home/live/mapfish/mapfish_workshop_fossgis2010/data``33 Then, open the explorer, go into the ``~/mapfish/mapfish_workshop_fossgis2010/data`` 34 34 folder and extract the ``countries.zip`` file. And enter the following commands 35 35 to import the ``countries`` Shapefile as a table named ``countries`` in the 36 36 ``mapfish_workshop`` database:: 37 37 38 cd /home/live/mapfish/mapfish_workshop_fossgis2010/data39 ~mapfish/mapfish_workshop_fossgis2010/data$shp2pgsql -s 4326 -I countries.shp countries | psql -d mapfish_workshop -U postgres38 cd ~/mapfish/mapfish_workshop_fossgis2010/data 39 shp2pgsql -s 4326 -I countries.shp countries | psql -d mapfish_workshop -U postgres 40 40 41 41 You can start pgAdmin and connect to the ``mapfish_workshop`` database to check … … 54 54 by this one:: 55 55 56 sqlalchemy.url = postgres://postgres:postgres@localhost:543 3/mapfish_workshop56 sqlalchemy.url = postgres://postgres:postgres@localhost:5432/mapfish_workshop 57 57 58 58 The connection string specifies that the ``postgres`` driver must be used, the 59 database system listens on ``localhost`` and on ``port`` 543 3, and the name of60 the database is ``mapfish_workshop``. (if it's not working, test also with port 5432, which is the normal port)59 database system listens on ``localhost`` and on ``port`` 5432, and the name of 60 the database is ``mapfish_workshop``. 61 61 62 62 Creating web service … … 85 85 2. generate the web service code with the ``mf-layer`` command:: 86 86 87 <env> ~mapfish/MapFishApp>paster mf-layer countries87 (env) $ paster mf-layer countries 88 88 89 89 3. configure a route to the ``countries`` controller, this is done by adding … … 98 98 restart ``MapFishApp`` with:: 99 99 100 <env> ~mapfish/MapFishApp>paster serve --reload development.ini100 (env) $ paster serve --reload development.ini 101 101 102 102 You can now open http://localhost:5000/countries?limit=1 in your browser, you
