Closed gboeing closed 1 month ago
I have thought about it for a while, but I'm in support of this. On the short term it will hurt, but on the long term it's clearly the preferred solution.
One major advantage is that you could directly pass a Shapely geometry with the .bounds
method, which uses the order you propose.
WIP in #1196
What problem does your feature proposal solve?
Geographic bounding boxes usually follow the standard format of
left, bottom, right, top
(e.g., at OpenStreetMap and Shapely). For whatever reason, OSMnx instead expects them in the format oftop, bottom, right, left
(equivalent tonorth, south, east, west
). I'm probably responsible for this oddity, but the reason behind it is lost to time. Currently, users have to read the docstring to know to use this non-standard format.What is your proposed solution?
We should consider changing the expected bounding box format package-wide to the usual standard
left, bottom, right, top
in advance of the v2.0.0 release (which will have some breaking changes anyway).Drawbacks: old code using the old format will break in v2.0.0.
Advantages: OSMnx will be aligned with global standards, creating less surprise for new users and eliminating a common source of unexpected bugs.
Additional context
I'd be grateful for any comments/feedback on whether the advantages are worth the drawbacks. It'd be an easy fix prior to the next beta release, if it's worth doing. FWIW, my current opinion is "yes."