1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| import requests
xml = """<?xml version="1.0" encoding="UTF-8"?>
<XLS
xmlns:gml="http://www.opengis.net/gml"
xmlns="http://www.opengis.net/xls"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2"
xsi:schemaLocation="http://www.opengis.net/xls http://schemas.opengis.net/ols/1.2/olsAll.xsd">
<RequestHeader srsName="epsg:4326"/>
<Request maximumResponses="25" methodName="GeocodeRequest" requestID="uid42" version="1.2">
<GeocodeRequest returnFreeForm="false">
<Address countryCode="StreetAddress">
<freeFormAddress>2 avenue Pasteur 94160 Saint-Mandé</freeFormAddress>
</Address>
</GeocodeRequest>
</Request>
</XLS>"""
print(requests.post('https://wxs.ign.fr/CLEF/geoportail/ols?', data=xml).text) |