Hi Martin,

Glad you got it running.

The OGCserver is designed to generate images in the browser  
dynamically and does not save them anywhere. So, if you've got your  
world map appearing with that request then you are good to go. The  
next step would be to set up OpenLayers or some other Client  
application to form up those requests automatically for you so you can  
pan and zoom.

If you want to save the images you should try out Nik2img.py or  
generate_tiles.py.

If you are asking about where the shapefile is located that the map is  
being generated from, that is set in your 'map_factory.py' file which  
the ogcserver.conf points to.

Dane



On Feb 24, 2009, at 3:30 AM, tschobber tschöbbi wrote:

> Ok, I made it now ;) ...
>
> I'm able to run OGCserver when i type in the following:
>
> http://localhost/cgi-bin/mapnikwms.py
>
> I get this message in firefox browser:
>
> Welcome to the Mapnik OGCServer.
> Ready to accept map requests...
> For more info see: trac.mapnik.org
>
> When I try an example, typing this into my browser:
>
> http://localhost/cgi-bin/mapnikwms.py?LAYERS=world&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-180.0000000000001,-90,119.46385052802589,209.463850528026&WIDTH=256&HEIGHT=256
>
> It shows me a picture showing a worldmap, but where do I find this  
> file on my system or where did it save my file? In the /tmp  
> directory I didn't find anything and in the cgi-bin directory too.
>
> Martin
>
>
>
>
>
> -------------------------------------------------------
>
> Hi Dane,
>
> I've still the same problems - I would really appreciate it if you  
> could help me. I use apache cgi but it still doesn't work. I tried
>
> Martin
> ----------------------------------------------------
>
>
> Thanks again :) ... but I'm still a bit helpless. I've set up an  
> Apache2.2 server with php cli (I've done that the first time :( ).
>
> I made it in this manner:
>
> - I copied the source from http://trac.mapnik.org/wiki/OgcServerSvn  
> and saved it as WMSFactory.py.
>
> - When I type "python WMSFactory.py" I get the following output in  
> the shell:
>
> registered datasource : postgis
> registered datasource : raster
> registered datasource : shape
> destroyed singleton
> destroyed singleton
> destroyed singleton
>
> - So I edit the httpd.conf and put in the following line:
> AddHandler cgi-script .cgi .py
> (what script is meant in the other option: "... renaming the script  
> to mapnikserv.cgi ...")
>
> - Then I restarted apache2 server and tried to open the file in the  
> browser:
> http://localhost/cgi-bin/WMSFactory.py
>
> and got this error:
>
> Error: Premature end of script headers: WMSFactory.py
> Error 500
>
> Am I at least almost on the right way?
>
> Remaining (stupid) questions concerning the Readme.txt of
> http://mapnik-utils.googlecode.com/svn/example_code/wms/readme:
>
> - What's the path to the wms server? Where can I find it?
> - What about the ogcserver.conf file? What I have to do with it? To  
> where I have to copy it? (Now it's in the downloaded source  
> directory of mapnik)
>
> Sry again for my newbie questions, but I really need your help.
>
> Thank you,
>
> Martin
>
>
>
> -------- Original-Nachricht --------
>> Datum: Wed, 18 Feb 2009 09:30:40 -0800
>> Von: Dane Springmeyer <[email protected]>
>> An: "tschobber tschöbbi" <[email protected]>
>> Betreff: Re: [Mapnik-users] Problems building Mapnik (build with  
>> python2.6    and scons.py)
>
>> Martin,
>>
>> Comments inline...
>>
>> On Feb 18, 2009, at 1:03 AM, tschobber tschöbbi wrote:
>>
>>> Hi Dane,
>>>
>>> thank you very much for your help - I'll try Mapnik with the latest
>>> version ;) ... Next I'm trying to install Mapnik with WMS and OGC
>>> server and found this documentation
>> http://trac.mapnik.org/wiki/OgcServerSvn
>>> but I don't know how to proceed. I have several questions:
>>>
>>> - What about this OGC/WMS server? Do I have to install them first?
>>
>> No, the server is written in python and installs automatically when
>> you Build and install mapnik.
>>
>>> Because I found no ogcserver executable but only a directory named
>>> ogcserver and the ogcserver.conf I just found in the source
>>> directory of the mapnik download.
>>>
>>
>> That is the server, just a python module, not really an 'executable'.
>>
>>
>>> - Next question concerns this sentences (under "Configuring the
>>> server"): "Edit the path to the interpreter in the first line."
>>
>> Ya, that is confusing. I think that is no longer relevant. Just make
>> sure you can do:
>>
>> $ python
>> Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
>> [GCC 4.0.1 (Apple Inc. build 5465)] on darwin
>> Type "help", "copyright", "credits" or "license" for more  
>> information.
>>>>> from mapnik.ogcserver import *
>>>>>
>>
>> without errors... and the you know the code is working.
>>
>>>
>>>
>>> Why do I have to edit this path and how should I edit it?
>>>
>>
>> I don't think you need to edit any paths in the code. You just need  
>> to
>> set up the server as either CGI, Mod_python, or a WSGI app within
>> Apache.
>>
>> However, for learning I recommend setting up the server to test
>> OUTSIDE of apache.
>>
>> To do this adapt the 'localogc.py' program from here:
>> http://mapnik-utils.googlecode.com/svn/example_code/wms/
>>
>> That 'localogc/py' script will boot up the server on port 8000 once  
>> it
>> is pointed at the configuration file (and once the map_factory
>> referenced in the confi file on on the python path). The  
>> configuration
>> file must point at a 'map_factory.py' script that either creates you
>> map definitions in python or loads an xml file.
>>
>> Next you'll need an Openlayers HTML pages to test sending GET  
>> requests
>> to the server at http://localhost:8000?key=param&key=param....
>>
>> Dane
>
> -- 
> Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL
> für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/? 
> ac=OM.AD.PD003K11308T4569a
>
> -- 
> Computer Bild Tarifsieger! GMX FreeDSL - Telefonanschluss + DSL
> für nur 17,95 ¿/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
>
> -- 
> Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit  
> allen: http://www.gmx.net/de/go/multimessenger01

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to