NOAA Logo, NOAA Satellites and Information, National Geophysical Data Center (NGDC). go to NGDC bathymetric and relief data

Coastline Extractor

Making Continuous Coastlines
(or other types of lines!)

Fragmented coastline segments can be concatenated to form continuous coastline pieces using a MATLAB routine "join_cst.m". Join_cst starts at the end of the first segment and attempts to append the segment with the nearest endpoint that is within a specified tolerance of the first segment endpoint. It continues adding segments until no more are within a tolerance of the last end point. It then goes back to the beginning of the first segment and attempts to append segments. When no more segments can be found within the tolerance, it starts a new segment, and continues generating contatenated segments until all the original coastline segments have been used. It then sorts the newly concatenated segments into descending order by size. Thus the coastline is usually the first segment, followed by large islands, then smaller islands, etc. This sorted coastline is ideal for blanking or filling purposes, as all islands will be polygons that can be filled, and the coast can be turned into a polygon with a few extra points.

Get the m-files!

  • Download joincst.m and place in a directory accessible to Matlab.
  • Type "joincst" in Matlab to "unbundle" the collection of files.
  • Type "help join_cst" in Matlab for instructions on use.

return to coastline extractor