The Oce package presently handles map projections by using the ``mapproj`` package, but an alternative is the ``proj4`` package. This post compares the two, focussing on the vexing problem of islands crossing the edge of the earth, which causes spurious lines on some Oce maps at present.
Soon after map projections were added to Oce, bug reports showed that coastline plots in some projections were subject to anomalous lines that run horizontally on the plot. A ad-hoc scheme was code to try to prevent this, but it does not always work. Problems are compounded for filled coastlines.
I had thought this was a basic problem of all projection coding, until I happened to try using the proj4 package instead of mapproj to carry out the projections. The result is that the annoying lines went away.
At least in this example, the proj4 package produces better coastlines, somehow being clever enough to cut the polygons that cross the “edge” of the earth.
I will do some more tests to see if this is a fluke case, but if I think proj4 is promising, I will see how to invent a scheme for handling the mapproj arguments called parameters and orientation with proj4. THis seems to be a bit tricky, at first glance, but let’s keep the cart behind the horse for now.