GIScience / ohsome-py

Python bindings for the ohsome API
GNU General Public License v3.0
18 stars 4 forks source link

Autmatically split geom (and tag?) input if timeout occurs #37

Open SlowMo24 opened 3 years ago

SlowMo24 commented 3 years ago

Ohsome api has a reasonable timeout but sometimes users need more. This client could split the provided boundary parameter into multiple chunks and run multiple requests either if timeout occurs or if a certain area threshold is exceeded.

The same would also be possible with some filter parameters like the tag or (geometry)type but this would require more work (as it is only applicable if they are ORed together) and the benefit is not as large.

SlowMo24 commented 3 years ago

functionality already present in https://gitlab.gistools.geog.uni-heidelberg.de/giscience/big-data/ohsome/libs/ohsome2x

related: #36

SlowMo24 commented 11 months ago

The retry mechanism may interfere here and should be disabled for this feature

SlowMo24 commented 11 months ago

here is some code that does this: https://gitlab.gistools.geog.uni-heidelberg.de/giscience/ideal-vgi/osm-element-vectorisation/-/blob/0e2a301af2490684ac819ae320ec70dd8d8110f3/src/osm_element_vectorisation/settings/backend/ohsome.py