mapdata R package contains a coastline called
worldHires which is contained within a text file with a bit over 2 million lines. Since the
coastlineWorldFine dataset in the
ocedata package contains about 0.5 million points, I thought I would explore how much better the
mapdata coastline might be.
First, I wrote the following C file to translate the data to something that R can read.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Then, I created a datafile for plotting. It turns out that
mapdata numbers are in radians, so a conversion was required.
I plotted this “new” dataset and the “old” one (containined in
ocedata) and the results are shown below.
There are some differences between the two, but nothing dramatic (e.g. no Northwest Arm of Halifax Harbour). Certainly it would be difficult to argue for exapanding the memory footprint of
ocedata by a factor of 4.