# Introduction

The 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.

# Methods

First, I wrote the following C file to translate the data to something that R can read.

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.

# Conclusions

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.

This website is written in Jekyll, and the source is available on GitHub.