I only experimented a bit:
"gshhs_c.dat" is a binary file containing a long list of lon, lat points of all coasts as the number of single-precision floating-point numbers 32b:
lon1, lat1, lon2, lat2, ..., lonn, latn.
the file "gshhsmeta_c.dat" contains information about the relationships of these points:
1, area, numpoints, limit_south, limit_north, startbyte, numbytes, id-(E/W crosses dateline east or west)
In my case, the first entry (eurasia):
1 50654050.7558 1004 1.26950 77.71625 0 8032 0-E
We can read and build it with:
import numpy as np import matplotlib.pyplot as plt binfile = open('gshhs_c.dat','rb') data = np.fromfile(binfile,'<f4') data = data.reshape(len(data)/2,2) plt.plot(data[:1004,0],data[:1004,1]) plt.show()
Other files should have more or less the same format, as they are read by the same function.
EDIT: Some versions of the base version do not have line intersections. The file format is essentially the same