Hi,

Once again, these are your primary problems, but anyway
- Is is absolutely best to give always also the VERSION parameter so you decide 
what should happen do there is no need to guess  what the WMS server is doing 
if VERSION is missing.  Standars says, if I remember, that in that case it 
should use the highest version supported by the server but all WMS servers are 
not bug-free.
- It is SRS with WMS 1.1.1 but CRS with 1.3.0.  Don't ask why.
- While in WMS 1.1.1 bbox coordinates are always given in order 
easting-northing, in WMS 1.3.0 it depends on the official definitions of the 
projection.  EPSG:4326 is one of those projectios which demand the bbox 
coordinates to be given in order northing-easting (latitude-longitude).  See 
the two last lines from
http://www.epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:crs:EPSG::4326%20&reportDetail=short&style=urn:uuid:report-style:default-with-code&style_name=OGP%20Default%20With%20Code&title=EPSG:4326

Your main consern right now is that your server does not run the python script 
but sends it to you. There must be some error with the configuration and I am 
sure that somebody on this list will help you with it.

-Jukka Rahkonen-

> -----Alkuperäinen viesti-----
> Lähettäjä: Tamas Janovics [mailto:[email protected]] 
> Lähetetty: 17. helmikuuta 2011 13:37
> Vastaanottaja: Rahkonen Jukka; [email protected]
> Aihe: Re: [Mapnik-users] mapnik + apache + ogcserver + postgis problem
> 
> Hello!
> 
> Thank you for your fast reply. I tried what you suggest, but it makes 
> the same output as before.
> I tried these query strings:
> http://localhost/fcgi-bin/wms?SERVICE=WMS&VERSION=1.3.0&REQUES
T=GetMap&LAYERS=&FORMAT=image/png&SRS=EPSG:4326&STYLES=&BBOX=> 
16.0,45.5,23.0,48.7&EXCEPTIONS=application/vnd.ogc.se_inimage&
> width=600&height=300
> http://localhost/fcgi-bin/wms?SERVICE=WMS&REQUEST=GetMap&LAYER
S=&FORMAT=image/png&SRS=EPSG:4326&STYLES=&BBOX=16.0,45.5,23.0,48.7> 
&EXCEPTIONS=application/vnd.ogc.se_inimage&width=600&height=300
> 
> Any other idea?
> Tamas J
> 
> 2011-02-17 11:43 keltezéssel, Rahkonen Jukka írta:
> > Hi,
> >
> > This is probably not your problem at all, but I never knew 
> that according to WMS 1.1.1 standard having SERVICE=WMS is 
> not mandatory. In WMS 1.3.0 is is mandatory. I think it is 
> still a good habit to use&SERVICE=WMS always.
> >
> > -Jukka Rahkonen-
> >
> >
> >> -----Alkuperäinen viesti-----
> >> Lähettäjä:[email protected]
> >> [mailto:[email protected]] Puolesta 
> Tamas Janovics
> >> Lähetetty: 17. helmikuuta 2011 12:01
> >> Vastaanottaja:[email protected]
> >> Aihe: [Mapnik-users] mapnik + apache + ogcserver + postgis problem
> >>
> >> Hello!
> >>
> >> I tried to set up a Mapnik WMS with Apache2 and PostGIS
> >> database/datasource. I followed this tutorial:
> >> http://www.perrygeo.net/wordpress/?p=49, but when I ran 
> the script in
> >> the browser, the output was the content of my script. My 
> os is Debian
> >> Lenny, the version of Apache 2.2.9-10.
> >> This is my query string in the browser:
> >> http://localhost/fcgi-bin/wms?VERSION=1.1.1&REQUEST=GetMap&LAY
> > 
> ERS=hungary.roads&FORMAT=image/png&SRS=EPSG:4326&STYLES=&BBOX=
> >  16.0,45.5,23.0,48.7&EXCEPTIONS=application/vnd.ogc.se_inimage&
> >> width=600&height=300
> >> Here is my map_factory.py:
> >>
> >> from mapnik.ogcserver.WMS import BaseWMSFactory
> >>
> >> class WMSFactory(BaseWMSFactory):
> >>       def __init__(self):
> >>       BaseWMSFactory.__init__(self)
> >>              self.loadXML('/opt/mapnik/mapfile.xml')
> >>              self.finalize()
> >>
> >> the mapfile.xml:
> >>
> >> <Map bgcolor="#f2eff9" srs="+proj=merc +a=6378137 +b=6378137
> >> +lat_ts=0.0
> >> +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null
> >> +no_defs +over">
> >> <Style name="HungaryStyle">
> >> <Rule>
> >> <LineSymbolizer>
> >> <CssParameter name="stroke">#000080</CssParameter>
> >> <CssParameter name="stroke-width">0.2</CssParameter>
> >> </LineSymbolizer>
> >> </Rule>
> >> </Style>
> >> <Layer name="hungary.roads" srs="+proj=latlong +datum=WGS84">
> >> <StyleName>HungaryStyle</StyleName>
> >> <Datasource>
> >> <Parameter name="type">postgis</Parameter>
> >> <Parameter name="host">localhost</Parameter>
> >> <Parameter name="dbname">hungary</Parameter>
> >> <Parameter name="user">mapuser</Parameter>
> >> <Parameter name="password">mapuser</Parameter>
> >> <Parameter name="table">hungary.roads</Parameter>
> >> </Datasource>
> >> </Layer>
> >> </Map>
> >>
> >> the ogcserver.conf:
> >>
> >> # server: This section contains software related
> >> configuration parameters.
> >> [server]
> >> # module:  The module containing the MapFactory class.  See
> >> the readme for
> >> #          details.
> >> # This would be the name of the map_factory file (without
> >> extension .py)
> >> module=/opt/mapnik/map_factory
> >> # service: This section contains service level metadata.
> >> [service]
> >> # maxwidth, maxheight: The maximum size that a map will be
> >> supplied at.
> >> #                      Exceeding it will raise an error in 
> the client.
> >> maxheight=2048
> >> maxwidth=2048
> >> # allowedepsgcodes:  The comma seperated list of epsg codes
> >> we want the
> >> server
> >> #                    to support and advertise as supported in
> >> GetCapabilities.
> >> allowedepsgcodes=4326
> >> # onlineresource:  A service level URL most likely pointing
> >> to the web
> >> site supporting the service for example.  This is NOT the online
> >> resource pointing to the CGI.
> >> onlineresource=http://localhost/
> >>
> >> and my wms.py script:
> >>
> >> #!/usr/bin/env python
> >> # Your mapnik dir containing the map factory
> >> # must be in the python path!
> >>
> >> import sys
> >> sys.path.append('/opt/mapnik/')
> >>
> >> from mapnik.ogcserver.cgiserver import Handler
> >> import jon.fcgi as fcgi
> >>
> >> class WMSHandler(Handler):
> >>       configpath = '/opt/mapnik/ogcserver.conf'
> >> fcgi.Server({fcgi.FCGI_RESPONDER: WMSHandler}).run()
> >>
> >> If anyone know what I am doing wrong, please write to me!
> >> Thanks, Tamas J
> >>
> >> _______________________________________________
> >> Mapnik-users mailing list
> >> [email protected]
> >> https://lists.berlios.de/mailman/listinfo/mapnik-users
> >>
> 
> 
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to