Hi Jukka, That's great!
I just put one online using the latest ogcserver code: http://terra.girona.cat/ogc/wms/ogcserver_test/ ________________________________ De: Rahkonen Jukka [mailto:[email protected]] Enviado el: martes, 03 de mayo de 2011 12:11 Para: Clos Crespo, Manel; [email protected]; [email protected] Asunto: Re: [Mapnik-users] WSGI WMS Problem Hi, If there is an open WMS server somewhere I can test it with a few more clients. -Jukka Rahkonen- ________________________________ Lähettäjä: [email protected] [mailto:[email protected]] Puolesta [email protected] Lähetetty: 3. toukokuuta 2011 12:41 Vastaanottaja: [email protected]; [email protected] Aihe: Re: [Mapnik-users] WSGI WMS Problem Hi Rob, Could you please try the code at https://github.com/mapnik/OGCServer/ ? I've been fixing some issues with GetCapabilities and creating a list of clients known to work with the current version: https://github.com/mapnik/OGCServer/wiki If you check a client that is not on the list tell us if it works or not. Thanks! ________________________________ De: [email protected] [mailto:[email protected]] En nombre de Rob McCulley Enviado el: lunes, 02 de mayo de 2011 19:46 Para: [email protected] Asunto: [Mapnik-users] WSGI WMS Problem Hi All, I've got a mapnik WMS server setup using WSGI. The WMS server works fine delivering images, but any XML output from the server includes various 'ns0:' and 'ns1' items (see GetCapabilities example at the end). These make it appear as a non-valid WMS server to most applications. Searching the internet turned up a couple of results regarding this that stated all I needed was to have 'SERVICE=WMS' in my request, but it already was in the request. Any ideas how to get rid of these? Thanks, Rob My ogcserver.conf: [server] module=map_factory # if debug is on default to html handler debug=0 [service] title=CVR WMS Server abstract=County of Vermilion River Mapnik based Web Map Service maxheight=2048 maxwidth=2048 allowedepsgcodes=26912 onlineresource=http://localhost/wsgi-bin/mapnikwms.wsgi? fees= keywordlist= accessconstraints= [contact] contactperson= contactorganization= contactposition= addresstype= address= city= stateorprovince= postcode= country= contactvoicetelephone= contactelectronicmailaddress= My map_factory.py: from mapnik.ogcserver.WMS import BaseWMSFactory import mapnik PROJ4_STRING = '+init=epsg:26912' class WMSFactory(BaseWMSFactory): def __init__(self): BaseWMSFactory.__init__(self) self.loadXML(r'C:\Program Files (x86)\Apache Software Foundation\Apache2.2\wsgi-bin\cvr_map.xml') self.finalize() My mapnikwms.wsgi: import sys from mapnik.ogcserver.wsgi import WSGIApp sys.path.append(r'C:\Program Files (x86)\Apache Software Foundation\Apache2.2\wsgi-bin') application = WSGIApp(r'C:\Program Files (x86)\Apache Software Foundation\Apache2.2\wsgi-bin\ogcserver.conf') My cvr_map.xml: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE Map> <Map bgcolor="transparent" srs="+proj=utm +zone=12 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"> <Style name="ParcelOutlinesStyle"> <Rule> <LineSymbolizer> <CssParameter name="stroke">rgb(0,0,0)</CssParameter> <CssParameter name="stroke-width">0.5</CssParameter> </LineSymbolizer> </Rule> </Style> <Style name="ContourIntervalsStyle"> <Rule> <Filter>[major] = 'true'</Filter> <LineSymbolizer> <CssParameter name="stroke">rgb(0,0,0)</CssParameter> <CssParameter name="stroke-width">1</CssParameter> </LineSymbolizer> </Rule> <Rule> <Filter>[major] = 'false'</Filter> <LineSymbolizer> <CssParameter name="stroke">rgb(100,100,100)</CssParameter> <CssParameter name="stroke-width">0.8</CssParameter> </LineSymbolizer> </Rule> </Style> <Style name="ContourIntervalLabelsStyle"> <Rule> <Filter>[major] = 'true'</Filter> <TextSymbolizer name="interval" face_name="DejaVu Sans Book" size="10" fill="black" halo_fill="white" halo_radius="1" placement="line" allow_overlaps="false" /> </Rule> </Style> <Layer name="ParcelOutlines" srs="+proj=utm +zone=12 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"> <StyleName>ParcelOutlinesStyle</StyleName> <Datasource> <Parameter name="type">postgis</Parameter> <Parameter name="host">localhost</Parameter> <Parameter name="dbname">cvr3</Parameter> <Parameter name="user">vermilio</Parameter> <Parameter name="password">Verm*2005</Parameter> <Parameter name="table">(select title.polygons.shape FROM title.polygons) AS parcel</Parameter> <Parameter name="extent">465915,5856658,598477,5971684</Parameter> </Datasource> </Layer> <Layer name="ContourIntervals" srs="+proj=utm +zone=12 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"> <StyleName>ContourIntervalsStyle</StyleName> <Datasource> <Parameter name="type">postgis</Parameter> <Parameter name="host">localhost</Parameter> <Parameter name="dbname">cvr3</Parameter> <Parameter name="user">vermilio</Parameter> <Parameter name="password">Verm*2005</Parameter> <Parameter name="table">(select CAST (cadastral.contours.major AS text) AS major, cadastral.contours.interval AS interval, cadastral.contours.shape AS shape FROM cadastral.contours) AS foo</Parameter> <Parameter name="extent">465915,5856658,598477,5971684</Parameter> </Datasource> </Layer> <Layer name="ContourIntervelLabels" srs="+proj=utm +zone=12 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"> <StyleName>ContourIntervalLabelsStyle</StyleName> <Datasource> <Parameter name="type">postgis</Parameter> <Parameter name="host">localhost</Parameter> <Parameter name="dbname">cvr3</Parameter> <Parameter name="user">vermilio</Parameter> <Parameter name="password">Verm*2005</Parameter> <Parameter name="table">(select CAST (cadastral.contours.major AS text) AS major, cadastral.contours.interval AS interval, cadastral.contours.shape AS shape FROM cadastral.contours) AS foo</Parameter> <Parameter name="extent">465915,5856658,598477,5971684</Parameter> </Datasource> </Layer> </Map> My GetCapabilities: <?xml version="1.0" encoding="UTF-8"?><ns0:WMS_Capabilities version="1.3.0" ns1:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd" xmlns:ns0="http://www.opengis.net/wms" xmlns:ns1="http://www.w3.org/2001/XMLSchema-instance"> <ns0:Service> <ns0:Name>WMS</ns0:Name> <Title>CVR WMS Server</Title><Abstract>County of Vermilion River Mapnik based Web Map Service</Abstract><OnlineResource ns2:href="http://localhost/wsgi-bin/mapnikwms.wsgi?" ns2:type="simple" xmlns:ns2="http://www.w3.org/1999/xlink" /><MaxWidth>2048</MaxWidth><MaxHeight>2048</MaxHeight></ns0:Service> <ns0:Capability> <ns0:Request> <ns0:GetCapabilities> <ns0:Format>text/xml</ns0:Format> <ns0:DCPType> <ns0:HTTP> <ns0:Get> <ns0:OnlineResource ns2:href="http://localhost:80?" ns2:type="simple" xmlns:ns2="http://www.w3.org/1999/xlink" /> </ns0:Get> </ns0:HTTP> </ns0:DCPType> </ns0:GetCapabilities> <ns0:GetMap> <ns0:Format>image/png</ns0:Format> <ns0:Format>image/jpeg</ns0:Format> <ns0:DCPType> <ns0:HTTP> <ns0:Get> <ns0:OnlineResource ns2:href="http://localhost:80?" ns2:type="simple" xmlns:ns2="http://www.w3.org/1999/xlink" /> </ns0:Get> </ns0:HTTP> </ns0:DCPType> </ns0:GetMap> <ns0:GetFeatureInfo> <ns0:Format>text/plain</ns0:Format> <ns0:DCPType> <ns0:HTTP> <ns0:Get> <ns0:OnlineResource ns2:href="http://localhost:80?" ns2:type="simple" xmlns:ns2="http://www.w3.org/1999/xlink" /> </ns0:Get> </ns0:HTTP> </ns0:DCPType> </ns0:GetFeatureInfo> </ns0:Request> <ns0:Exception> <ns0:Format>XML</ns0:Format> <ns0:Format>INIMAGE</ns0:Format> <ns0:Format>BLANK</ns0:Format> </ns0:Exception> <ns0:Layer> <ns0:Title>A Mapnik WMS Server</ns0:Title> <ns0:Abstract>A Mapnik WMS Server</ns0:Abstract> <CRS>EPSG:26912</CRS><Layer><Name>ParcelOutlines</Name><EX_GeographicBoundingBox><westBoundLongitude>-111.506243765</westBoundLongitude><eastBoundLongitude>-109.501771629</eastBoundLongitude><southBoundLatitude>52.8585715183</southBoundLatitude><northBoundLatitude>53.8842536284</northBoundLatitude></EX_GeographicBoundingBox><BoundingBox CRS="UTM +ZONE" maxx="598477.0" maxy="5971684.0" minx="465915.0" miny="5856658.0" /><Style><Name>ParcelOutlinesStyle</Name><Title>ParcelOutlinesStyle</Title></Style><Style><Name>ParcelOutlinesStyle</Name><Title>ParcelOutlinesStyle</Title></Style></Layer><Layer><Name>ContourIntervals</Name><EX_GeographicBoundingBox><westBoundLongitude>-111.506243765</westBoundLongitude><eastBoundLongitude>-109.501771629</eastBoundLongitude><southBoundLatitude>52.8585715183</southBoundLatitude><northBoundLatitude>53.8842536284</northBoundLatitude></EX_GeographicBoundingBox><BoundingBox CRS="UTM +ZONE" maxx="598477.0" maxy="5971684.0" minx="465915.0" miny="5856658.0" /><Style><Name>ContourIntervalsStyle</Name><Title>ContourIntervalsStyle</Title></Style><Style><Name>ContourIntervalsStyle</Name><Title>ContourIntervalsStyle</Title></Style></Layer><Layer><Name>ContourIntervelLabels</Name><EX_GeographicBoundingBox><westBoundLongitude>-111.506243765</westBoundLongitude><eastBoundLongitude>-109.501771629</eastBoundLongitude><southBoundLatitude>52.8585715183</southBoundLatitude><northBoundLatitude>53.8842536284</northBoundLatitude></EX_GeographicBoundingBox><BoundingBox CRS="UTM +ZONE" maxx="598477.0" maxy="5971684.0" minx="465915.0" miny="5856658.0" /><Style><Name>ContourIntervalLabelsStyle</Name><Title>ContourIntervalLabelsStyle</Title></Style><Style><Name>ContourIntervalLabelsStyle</Name><Title>ContourIntervalLabelsStyle</Title></Style></Layer></ns0:Layer> </ns0:Capability> </ns0:WMS_Capabilities>
_______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

