Ejemplo n.º 1
0
 def setup(self):
     self.common_cap_req = WMS111CapabilitiesRequest(url="/service?",
                                                     param=dict(
                                                         service="WMS",
                                                         version="1.1.1"))
     self.common_map_req = WMS111MapRequest(
         url="/service?",
         param=dict(
             service="WMS",
             version="1.1.1",
             bbox="-20037508,0.0,0.0,20037508",
             width="256",
             height="256",
             layers="wms_cache",
             srs="EPSG:900913",
             format="image/jpeg",
             styles="",
             request="GetMap",
         ),
     )
     self.common_fi_req = WMS111FeatureInfoRequest(
         url="/service?",
         param=dict(
             x="10",
             y="20",
             width="200",
             height="200",
             layers="wms_cache",
             format="image/png",
             query_layers="wms_cache",
             styles="",
             bbox="1000,400,2000,1400",
             srs="EPSG:900913",
         ),
     )
Ejemplo n.º 2
0
 def setup(self):
     SystemTest.setup(self)
     self.common_cap_req = WMS111CapabilitiesRequest(url='/service?',
                                                     param=dict(
                                                         service='WMS',
                                                         version='1.1.1'))
     self.common_map_req = WMS111MapRequest(
         url='/service?',
         param=dict(service='WMS',
                    version='1.1.1',
                    bbox='-20037508,0.0,0.0,20037508',
                    width='256',
                    height='256',
                    layers='wms_cache',
                    srs='EPSG:900913',
                    format='image/jpeg',
                    styles='',
                    request='GetMap'))
     self.common_fi_req = WMS111FeatureInfoRequest(
         url='/service?',
         param=dict(x='10',
                    y='20',
                    width='200',
                    height='200',
                    layers='wms_cache',
                    format='image/png',
                    query_layers='wms_cache',
                    styles='',
                    bbox='1000,400,2000,1400',
                    srs='EPSG:900913'))
Ejemplo n.º 3
0
 def setup(self):
     SystemTest.setup(self)
     self.common_req = WMS111MapRequest(url='/service?',
                                        param=dict(service='WMS',
                                                   version='1.1.1'))
     self.common_map_req = WMS111MapRequest(url='/service?',
                                            param=dict(service='WMS',
                                                       version='1.1.1',
                                                       bbox='-180,0,0,80',
                                                       width='200',
                                                       height='200',
                                                       layers='wms_cache',
                                                       srs='EPSG:4326',
                                                       format='image/png',
                                                       exceptions='xml',
                                                       styles='',
                                                       request='GetMap'))
     self.common_fi_req = WMS111FeatureInfoRequest(
         url='/service?',
         param=dict(x='10',
                    y='20',
                    width='200',
                    height='200',
                    layers='wms_cache',
                    format='image/png',
                    query_layers='wms_cache',
                    styles='',
                    bbox='1000,400,2000,1400',
                    srs='EPSG:900913'))
Ejemplo n.º 4
0
 def setup(self):
     self.common_req = WMS111MapRequest(url="/service?",
                                        param=dict(service="WMS",
                                                   version="1.1.1"))
     self.common_map_req = WMS111MapRequest(
         url="/service?",
         param=dict(
             service="WMS",
             version="1.1.1",
             bbox="-180,0,0,80",
             width="200",
             height="200",
             layers="wms_cache",
             srs="EPSG:4326",
             format="image/png",
             exceptions="xml",
             styles="",
             request="GetMap",
         ),
     )
     self.common_fi_req = WMS111FeatureInfoRequest(
         url="/service?",
         param=dict(
             x="10",
             y="20",
             width="200",
             height="200",
             layers="wms_cache",
             format="image/png",
             query_layers="wms_cache",
             styles="",
             bbox="1000,400,2000,1400",
             srs="EPSG:900913",
         ),
     )
Ejemplo n.º 5
0
 def setup(self):
     self.common_req = WMS111MapRequest(url="/service?",
                                        param=dict(service="WMS",
                                                   version="1.1.1"))
     self.common_map_req = WMS111MapRequest(
         url="/service?",
         param=dict(
             service="WMS",
             version="1.1.1",
             bbox="0,0,180,80",
             width="200",
             height="200",
             layers="wms_cache",
             srs="EPSG:4326",
             format="image/png",
             styles="",
             request="GetMap",
         ),
     )
     self.common_direct_map_req = WMS111MapRequest(
         url="/service?",
         param=dict(
             service="WMS",
             version="1.1.1",
             bbox="0,0,10,10",
             width="200",
             height="200",
             layers="wms_cache",
             srs="EPSG:4326",
             format="image/png",
             styles="",
             request="GetMap",
         ),
     )
     self.common_fi_req = WMS111FeatureInfoRequest(
         url="/service?",
         param=dict(
             x="10",
             y="20",
             width="200",
             height="200",
             layers="wms_cache",
             format="image/png",
             query_layers="wms_cache",
             styles="",
             bbox="1000,400,2000,1400",
             srs="EPSG:900913",
         ),
     )
     self.expected_base_path = "/service?SERVICE=WMS&REQUEST=GetMap&HEIGHT=256" "&SRS=EPSG%3A900913&styles=&VERSION=1.1.1&WIDTH=256" "&BBOX=0.0,0.0,20037508.3428,20037508.3428"
     self.expected_direct_base_path = "/service?SERVICE=WMS&REQUEST=GetMap&HEIGHT=200" "&SRS=EPSG%3A4326&styles=&VERSION=1.1.1&WIDTH=200" "&BBOX=0.0,0.0,10.0,10.0"
Ejemplo n.º 6
0
 def setup(self):
     SystemTest.setup(self)
     self.common_fi_req = WMS111FeatureInfoRequest(
         url='/service?',
         param=dict(x='10',
                    y='20',
                    width='200',
                    height='200',
                    layers='fi_layer',
                    format='image/png',
                    query_layers='fi_layer',
                    styles='',
                    bbox='1000,400,2000,1400',
                    srs='EPSG:900913'))
Ejemplo n.º 7
0
 def setup(self):
     SystemTest.setup(self)
     self.common_fi_req = WMS111FeatureInfoRequest(
         url='/service?',
         param=dict(x='10',
                    y='20',
                    width='200',
                    height='200',
                    layers='app2_with_layers_fi_layer',
                    format='image/png',
                    query_layers='app2_with_layers_fi_layer',
                    styles='',
                    bbox='1000,400,2000,1400',
                    srs='EPSG:3857',
                    info_format='application/json'))
Ejemplo n.º 8
0
    def test_transform_fi_request(self):
        req = WMS111FeatureInfoRequest(url=TESTSERVER_URL + '/service?map=foo', param={'layers':'foo', 'srs': 'EPSG:25832'})
        http = MockHTTPClient()
        wms = WMSInfoClient(req, http_client=http)
        fi_req = InfoQuery((8, 50, 9, 51), (512, 512),
                           SRS(4326), (128, 64), 'text/plain')

        wms.get_info(fi_req)

        assert wms_query_eq(http.requested[0],
            TESTSERVER_URL+'/service?map=foo&LAYERS=foo&SERVICE=WMS&FORMAT=image%2Fpng'
                           '&REQUEST=GetFeatureInfo&SRS=EPSG%3A25832&info_format=text/plain'
                           '&query_layers=foo'
                           '&VERSION=1.1.1&WIDTH=512&HEIGHT=797&STYLES=&x=135&y=101'
                           '&BBOX=428333.552496,5538630.70275,500000.0,5650300.78652'), http.requested[0]
Ejemplo n.º 9
0
 def setup(self):
     self.common_fi_req = WMS111FeatureInfoRequest(
         url="/service?",
         param=dict(
             x="10",
             y="20",
             width="200",
             height="200",
             layers="fi_layer",
             format="image/png",
             query_layers="fi_layer",
             styles="",
             bbox="1000,400,2000,1400",
             srs="EPSG:900913",
         ),
     )
Ejemplo n.º 10
0
 def setup(self):
     TilesTest.setup(self)
     self.common_req = WMS111MapRequest(url='/service?',
                                        param=dict(service='WMS',
                                                   version='1.1.1'))
     self.common_map_req = WMS111MapRequest(url='/service?',
                                            param=dict(service='WMS',
                                                       version='1.1.1',
                                                       bbox='0,0,180,80',
                                                       width='200',
                                                       height='200',
                                                       layers='wms_cache',
                                                       srs='EPSG:4326',
                                                       format='image/png',
                                                       styles='',
                                                       request='GetMap'))
     self.common_direct_map_req = WMS111MapRequest(url='/service?',
                                                   param=dict(
                                                       service='WMS',
                                                       version='1.1.1',
                                                       bbox='0,0,10,10',
                                                       width='200',
                                                       height='200',
                                                       layers='wms_cache',
                                                       srs='EPSG:4326',
                                                       format='image/png',
                                                       styles='',
                                                       request='GetMap'))
     self.common_fi_req = WMS111FeatureInfoRequest(
         url='/service?',
         param=dict(x='10',
                    y='20',
                    width='200',
                    height='200',
                    layers='wms_cache',
                    format='image/png',
                    query_layers='wms_cache',
                    styles='',
                    bbox='1000,400,2000,1400',
                    srs='EPSG:900913'))
     self.expected_base_path = '/service?SERVICE=WMS&REQUEST=GetMap&HEIGHT=256' \
         '&SRS=EPSG%3A900913&styles=&VERSION=1.1.1&WIDTH=256' \
         '&BBOX=0.0,0.0,20037508.3428,20037508.3428'
     self.expected_direct_base_path = '/service?SERVICE=WMS&REQUEST=GetMap&HEIGHT=200' \
         '&SRS=EPSG%3A4326&styles=&VERSION=1.1.1&WIDTH=200' \
         '&BBOX=0.0,0.0,10.0,10.0'
Ejemplo n.º 11
0
 def setup(self):
     self.common_fi_req = WMS111FeatureInfoRequest(
         url="/service?",
         param=dict(
             x="10",
             y="20",
             width="200",
             height="200",
             layers="app2_with_layers_fi_layer",
             format="image/png",
             query_layers="app2_with_layers_fi_layer",
             styles="",
             bbox="1000,400,2000,1400",
             srs="EPSG:3857",
             info_format="application/json",
         ),
     )