OK, that bug explains a lot. Thanks for bringing it up and I hope it gets fixed somehow :-)
Espen On Thu, Nov 17, 2011 at 2:53 PM, <manel.c...@ajgirona.cat> wrote: > Hi Espen, > > Yes, the problem seems to be QGIS. All other programs I've tested work as > expected. If you are using ogcserver only with QGIS you can modify your local > copy of ogcserver. > > https://github.com/mapnik/OGCServer/issues/8 > > > -----Missatge original----- > De: mapnik-users-boun...@lists.berlios.de > [mailto:mapnik-users-boun...@lists.berlios.de] En nom de Espen Isaksen > Enviat: jueves, 17 de noviembre de 2011 13:25 > Per a: bernd.gr...@mailbox.tu-dresden.de > a/c: Mapnik-users@lists.berlios.de > Tema: Re: [Mapnik-users] Antw.: Ogcserver problems > > Thanks for help and suggestions. Seem like the main problem is that I > got the the wrong order on the layers when calling ogcserver. Which > means an area layer is covering the other layers. Still not sure why > that happens. Might be QGIS making the error(or most likely me). Seems > like it is OK as long as I request only one layer. > > I addition to that I have created some error in the in the bounding > box in my request. > > Espen > > > > On Thu, Nov 17, 2011 at 8:50 AM, bernd.gr...@mailbox.tu-dresden.de > <bernd.gr...@mailbox.tu-dresden.de> wrote: >> your shape-data has only a min denominator,so there is no range to see it at >> another zoom level. >> just a guess. >> >> ----- Reply message ----- >> Von: "Bernd Grafe" <bernd.gr...@mailbox.tu-dresden.de> >> An: <mapnik-users@lists.berlios.de> >> Betreff: [Mapnik-users] Ogcserver problems >> Datum: Do., Nov. 17, 2011 02:52 >> >> >> I had the same problem and changed to epsg:4326. >> >> but try this: >> 1. >> python >> from mapnik2 import Projection >> Projection('init+=epsg=900913') >> >> --here you see if there is any problem in your epsg file >> >> 2. >> and i would change the map source of your test.xml: >> Map srs= +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 >> +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over >> >> 3. and maybe try another datasource - my wms doesnt show the shapefiles too. >> >> i hope i can help, >> bernd >> >> >> >> >> Am 16.11.2011 22:13, schrieb Espen Isaksen: >>> Hi! >>> >>> I have been struggling with this for a long time now so I just have to >>> ask for help on the list. >>> >>> I have set up ogcserver to read a Mapnik XML file(generated by >>> Tilemill), but I cannot get it to show me the correct output. All I >>> get now is a blank image. >>> >>> The logs do not give an error: >>> localhost - - [16/Nov/2011 21:03:22] "GET >>> >>> ///?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=219492.741938,6633651.694955,221702.329041,6635588.780398&CRS=EPSG:900913&WIDTH=1045&HEIGHT=917&LAYERS=__all__&STYLES=&FORMAT=image/png&DPI=72&TRANSPARENT=TRUE >>> HTTP/1.1" 200 3795 >>> >>> I don't think there is anything wrong with the projection as this file >>> works in Tilemill. I have tried both putting the EPSG code and the >>> full description in the top of the Mapnik XML file. >>> >>> Can anybody give me some advice? >>> >>> >>> >>> This is what I have: >>> >>> wms_wsgi.py >>> ####################### >>> >>> #!/usr/bin/env python >>> >>> import sys >>> from mapnik2.ogcserver.wsgi import WSGIApp >>> sys.path.append('/usr/lib/fcgi-bin/mapfactory.py') >>> >>> application = WSGIApp('/usr/lib/fcgi-bin/ogcserver.conf') >>> >>> # add these line to the bottom of your wsgi-based 'wms.py' >>> >>> if __name__ == '__main__': >>> from wsgiref.simple_server import make_server >>> httpd = make_server('localhost', 8080, application) >>> print "Listening on port 8080...." >>> httpd.serve_forever() >>> >>> >>> >>> mapfactory.py >>> ####################### >>> import os >>> from ogcserver.WMS import BaseWMSFactory >>> from mapnik2 import Style, Layer, Map, load_map >>> >>> class WMSFactory(BaseWMSFactory): >>> def __init__(self): >>> BaseWMSFactory.__init__(self) >>> base_path, tail = os.path.split(__file__) >>> file_path = os.path.join(base_path, '/home/espen/test.xml') >>> self.loadXML(file_path) >>> self.finalize() >>> >>> >>> >>> >>> 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=mapfactory >>> >>> # service: This section contains service level metadata. >>> >>> [service] >>> >>> # title: The title of the server. >>> >>> title=Mapnik OGC Server >>> >>> # abstract: An abstract describing the server. >>> >>> abstract=This abstract describes the server and its contents. >>> >>> # maxwidth, maxheight: The maximum size that a map will be supplied at. >>> # Exceeding it will raise an error in the client. >>> >>> maxheight=5024 >>> maxwidth=5024 >>> >>> # allowedepsgcodes: The comma seperated list of epsg codes we want the >>> server >>> # to support and advertise as supported in >>> GetCapabilities. >>> >>> allowedepsgcodes=4326,900913 >>> >>> # 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://www.turkompisen.no/wms8080 >>> baseurl=http://www.turkompisen.no/wms8080 >>> >>> # fees: An explanation of the fee structure for the usage of your service, >>> # if any. Use the reserved keyword "none" if not applicable. >>> >>> fees= >>> >>> # keywords: A comma seperated list of key words. >>> >>> keywordlist= >>> >>> # accessconstraints: Plain language description of any constraints that >>> might >>> # apply to the usage of your service, such as hours of >>> # operation. >>> >>> accessconstraints= >>> >>> # maxage: The content of the HTTP Cache-Control header - >>> # the maximum age of the content in a cache, measured >>> # in seconds. One week is 604800 seconds, the default >>> is >>> # 1 day. >>> maxage=86400 >>> >>> >>> >>> >>> test.xml >>> ###################### >>> <?xml version="1.0" encoding="utf-8"?> >>> <!DOCTYPE Map[]> >>> <Map srs="+init=epsg:900913" background-color="#b8dee6"> >>> >>> <FontSet name="fontset-0"> >>> <Font face-name="Ubuntu Regular"/> >>> <Font face-name="Arial Regular"/> >>> <Font face-name="DejaVu Sans Book"/> >>> </FontSet> >>> <Style name="shoreline_300" filter-mode="first"> >>> <Rule> >>> <MinScaleDenominator>400000</MinScaleDenominator> >>> <PolygonSymbolizer fill="#ffffff" /> >>> </Rule> >>> </Style> >>> <Layer name="shoreline_300" >>> srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 >>> +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs >>> +over"> >>> <StyleName>shoreline_300</StyleName> >>> <Datasource> >>> <Parameter >>> >>> name="file"><![CDATA[/home/espen/turkompisen/data/shoreline/shoreline_300.shp]]></Parameter> >>> <Parameter name="type"><![CDATA[shape]]></Parameter> >>> </Datasource> >>> </Layer> >>> ....... >>> _______________________________________________ >>> Mapnik-users mailing list >>> Mapnik-users@lists.berlios.de >>> https://lists.berlios.de/mailman/listinfo/mapnik-users >>> >> >> _______________________________________________ >> Mapnik-users mailing list >> Mapnik-users@lists.berlios.de >> https://lists.berlios.de/mailman/listinfo/mapnik-users >> >> _______________________________________________ >> Mapnik-users mailing list >> Mapnik-users@lists.berlios.de >> https://lists.berlios.de/mailman/listinfo/mapnik-users >> >> > _______________________________________________ > Mapnik-users mailing list > Mapnik-users@lists.berlios.de > https://lists.berlios.de/mailman/listinfo/mapnik-users > _______________________________________________ Mapnik-users mailing list Mapnik-users@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mapnik-users