Exemple #1
0
def test_xmlfilter_wfs_200():
    wfs = WebFeatureService(
        'https://services.ga.gov.au/gis/stratunits/ows',
        version='2.0.0')
    filter_prop = PropertyIsLike(propertyname='stratunit:geologichistory', literal='Cisuralian - Guadalupian',
        matchCase=True)

    filterxml = etree.tostring(filter_prop.toXML()).decode("utf-8")

    getfeat_params = {'typename': 'stratunit:StratigraphicUnit', 'filter': filterxml}

    response = wfs.getfeature(**getfeat_params).read()
    assert b'<stratunit:geologichistory>Cisuralian - Guadalupian</stratunit:geologichistory>' in response
Exemple #2
0
def test_xmlfilter_wfs_110():
    wfs = WebFeatureService('https://services.ga.gov.au/gis/stratunits/ows',
                            version='1.1.0')
    filter_prop = PropertyIsLike(propertyname='stratunit:GEOLOGICHISTORY',
                                 literal='Cisuralian - Guadalupian',
                                 matchCase=True)

    filterxml = etree.tostring(filter_prop.toXML()).decode("utf-8")

    getfeat_params = {
        'typename': 'stratunit:StratigraphicUnit',
        'filter': filterxml
    }

    response = wfs.getfeature(**getfeat_params).read()
    assert b'<stratunit:NAME>Ellen Harkins carbonaceous shale</stratunit:NAME>' in response