Is your feature request related to a problem? Please describe.
Related to #27 and #39
The user could pass bad values such as strange numbers or invalid values, or reverse the values like a latitude,longitude instead of longitude,latitude order
Describe the solution you'd like
We should consider a validity check here. A bbox should always consist of a (lon,lat) for the lower left (i.e. southwest) corner of a box, and (lon,lat) for the upper right (northeast) corner.
longitude range: has a min value of -180, a max value of 180
latitude range: has a min value of -90, max value of 90
latitude compare: in a bbox of [west,south,east,north] the value of south should always be smaller than the value of north (because south is lower, closer to -90, north is higher toward 90, even if both are negative)
longitude compare: in a bbox of [west,south,east,north] the value of west should always be smaller than the value of east, EXCEPT if the bbox crosses the international dateline, which we can check with #39. Technically any time that west > east it could cross the dateline, but could also be an error. If it passes the dateline test we should just consider it valid.
zero values: 0 is valid for all values in a bbox n a bbox of [west,south,east,north] the value
equal values: we should never see east == west and never see south == north. This produces a flat box or line that has no inner size to get data within
Describe alternatives you've considered
Alternative could be to let the user just get a message that the function fails and somewhere it will be due to an a invalid bounding box, but not made clear to the user
Is your feature request related to a problem? Please describe. Related to #27 and #39
The user could pass bad values such as strange numbers or invalid values, or reverse the values like a latitude,longitude instead of longitude,latitude order
Describe the solution you'd like We should consider a validity check here. A bbox should always consist of a (lon,lat) for the lower left (i.e. southwest) corner of a box, and (lon,lat) for the upper right (northeast) corner.
east == west
and never seesouth == north
. This produces a flat box or line that has no inner size to get data withinDescribe alternatives you've considered Alternative could be to let the user just get a message that the function fails and somewhere it will be due to an a invalid bounding box, but not made clear to the user