Around the World (Around the World)

This post was originally published on this site

The Daily WTF

Sandra has ongoing issues. When we last checked in, we had some problems with geography, and those problems haven’t been solved.

Now, one truth of geographic points is that they’re bounded. We know, for example, that longitudes cover the range (-180,180), and latitudes are always (-90,90). Even if we change the coordinate system, it will still have bounds, as the Earth is a closed shape with finite boundaries.

Sandra maintains an application that lets users annotate the map with their own data points, drawing shapes on the map and recording the coordinates of the shape. The code which manages the map layer allows the user to pan around the map, and transparently update its internal coordinates to remain within those boundaries. The code which manages the annotation layer, however, does not. It will happily let you draw a shape on New Zealand, and the coordinates might be 177 degrees, -183

To read the full article click on the 'post' link at the top.