I'd like to collect forest data on overpass turbo. But my code isn't working properly. Here is the first version:
import overpass
api = overpass.API()
res = api.get("""
area[name="Charente-Maritime"]->.searchArea;
(
way[landuse=forest](area.searchArea);
relation[landuse=forest](area.searchArea);;
way[natural=wood](area.searchArea);
relation[natural=wood](area.searchArea);
);
(._;>;);
out body;
""")
Here's the error message:
Traceback (most recent call last):
File "D:/3_PROJETS/00_TD/TD7-analyse_spatiale/02_TRAVAIL/forest.py", line 16, in <module>
""")
File "C:\python35\lib\site-packages\overpass\api.py", line 130, in get
return self._as_geojson(response["elements"])
File "C:\python35\lib\site-packages\overpass\api.py", line 214, in _as_geojson
raise UnknownOverpassError("Received corrupt data from Overpass (incomplete polygon).")
overpass.errors.UnknownOverpassError: Received corrupt data from Overpass (incomplete polygon).
I've tried many different syntaxes but none of them have worked so far.