Wider Than It Looks

To find charging stations within 5 km of a point at latitude 60 degrees north, an engineer builds a bounding box by adding and subtracting the same delta, about 0.045 degrees, to both latitude and longitude. Results near the east and west edges are missing. What went wrong?

A

Bounding boxes are only valid at the equator, so any radius search away from it has to fall back to scanning the full table

B

A degree of longitude shrinks with the cosine of latitude, so at 60 degrees the longitude delta must be about twice the latitude delta

C

A degree of longitude grows with the cosine of latitude, so the longitude delta should be about half the latitude delta at that point

D

The bounding box must be computed in radians before being applied to a decimal degree column, which is why the east west span is short