I'm using the gshhs function in the mapping toolbox to plot some coastlines, using the latest version of the GSHHG database maintained by Paul Wessel:
s = gshhs('gshhs_i.b',[32 33], [-65 -64]);
This call to gshhs reads in the coastline of Bermuda. s is a 5×1 structure array that consists of fields describing five polygons: one that denotes the North American mainland and four that denote Bermuda. I assume North America is included because Bermuda is grouped with North America in the database.
I plotted the resulting polygons and verified that the last four make up Bermuda and the first makes up the North American mainland, so the lat/lons included in the structure array are what I think they are. But when I print the "Area" field included in the structure array to query the area of each polygon (in km^2, as described in the gshhs function documentation), I get the following results:
area={s.Area}area = [2.0153e+07] [5.5061e+07] [8.8125e+07] [5.0053e+07] [6.1060e+06]
The actual total area of all islands in Bermuda is about 50 km^2 (which should roughly be the sum of polygons 2-5), so I must be making a bonehead move somewhere. I would much appreciate it if someone pointed out how to get the correct polygon areas. Thank you.
Best Answer