2005-06-28

We have discerned the following. MapServer is aware of the output projection as well as the projections of the input layers. If these are different, it apparently reprojects the coordinates of the view window from output projection coordinates to the coordinate system of the source data and applys that window to subset the source data.

In the case where the output projection is polar stereographic and the input data is lon/lat, if the window includes the pole, then when these coordinates are converted to lon/lat, one can get an annulus. The result is that data "drop out" or disappear from the inside of the annulus. The top figure below shows an overview of Antarctica. When zooming into the area marked in green, which does not include the pole, the data that were missing in the overview show up (bottom figure).

This problem makes it impossible to show an overview with complete data layers, unless we break our global dataset into three pieces (north polar, middle latitudes, and south polar). The same problem afflicts queries.

One possible solution would be for MapServer to detect when a pole is in the view port or selection box, then break the box into four pieces by cutting the box in the two orthogonal directions through the pole. It would also be safer to add vertices along each edge with in the projected space, and then transform all those vertices to the data SRS before doing the intersection operation.

2011-09-27: Entered ticket (#4035) for this in the MapServer trac.