Closed TheFGFSEagle closed 2 years ago
Dear @TheFGFSEagle,
Thanks for your request. Changing the code in OSMPythonTools
is maybe not a good idea, because if it accepts erroneous cases where a > c
or b > d
, this means that errors in the arguments are less likely to be detected. I understand well your motivation, but in general this can create issues.
To solve your issues, I rather would propose that you define a function orderArguments
that you can use universally like bbox=orderArguments([a, b, c, d])
. This would minimize code duplication on your side.
Best, Franz-Benjamin
Hi, I noticed that using the overpass.Overpass.query method, using inverted bounding boxes (i.e. where for bbox=[a, b, c, d] a > c or b > d) I get an
HTTP error 400: Bad request
. I suggest exchanging the two coordinates when they would produce that error otherwise - do you think that would be possible ? Because else I'd have to do that in the script that uses the OSMPythonTools, and every other user of this module too, which leads to an incredible amount of code duplication. Something like this in the constructor ofOSMPythonTools.overpass.overpassQueryBuilder
: