示例#1
0
    def test_transform_fi_request_supported_srs(self):
        req = ArcGISIdentifyRequest(url=TESTSERVER_URL + '/MapServer/export?map=foo', param={'layers':'foo'})
        http = MockHTTPClient()
        wms = ArcGISInfoClient(req, http_client=http, supported_srs=[SRS(25832)])
        fi_req = InfoQuery((8, 50, 9, 51), (512, 512),
                           SRS(4326), (128, 64), 'text/plain')

        wms.get_info(fi_req)

        assert_query_eq(http.requested[0],
            TESTSERVER_URL+'/MapServer/identify?map=foo'
                           '&imageDisplay=512,797,96&sr=25832&f=json'
                           '&layers=foo&tolerance=5&returnGeometry=false'
                           '&geometryType=esriGeometryPoint&geometry=447229.979084,5636149.370634'
                           '&mapExtent=428333.552496,5538630.70275,500000.0,5650300.78652',
            fuzzy_number_compare=True)
示例#2
0
    def test_fi_request(self):
        req = ArcGISIdentifyRequest(url=TESTSERVER_URL + '/MapServer/export?map=foo', param={'layers':'foo'})
        http = MockHTTPClient()
        wms = ArcGISInfoClient(req, http_client=http, supported_srs=[SRS(4326)])
        fi_req = InfoQuery((8, 50, 9, 51), (512, 512),
                           SRS(4326), (128, 64), 'text/plain')

        wms.get_info(fi_req)

        assert_query_eq(http.requested[0],
            TESTSERVER_URL+'/MapServer/identify?map=foo'
                           '&imageDisplay=512,512,96&sr=4326&f=json'
                           '&layers=foo&tolerance=5&returnGeometry=false'
                           '&geometryType=esriGeometryPoint&geometry=8.250000,50.875000'
                           '&mapExtent=8,50,9,51',
            fuzzy_number_compare=True)