I'm looking for a shapefile for the coastline of the UK.

I'm guessing the Ordnance Survey 'geo-portal' is the best place to get this, but whenever I go to the Ordnance Survey site I get the shakes. (Seriously, trying to find any data on that site is really traumatic. I don't have a spare three days.)

Does anyone just have a simple URL for such a shapefile?


4 Answers 4


My number one source for shapefiles is DIVA-GIS, simply select your country (United Kingdom) and subject (Administrative areas).

Unzip the downloaded file and you should see 3 polygon shapefiles with differing top-levels. The layer GBR_adm0 contains a single polygon of the UK:

UK polygon shapefile

If you wish, you can convert this to a line shapefile (I used QGIS 2.6):

UK line shapefile


For the free Ordnance Survey data, go to https://www.ordnancesurvey.co.uk/opendatadownload/products.html. Click on the big button at the top labelled "Order Now". On the new page, scroll down until you see Boundary Line. Each dataset has a number of check boxes for ordering options. Boundary line is only offered for the whole of the Great Britain so you only get two check boxes. The one on the left is to order on DVD and the one on the right is to download. I'd recommend the download option. Check the box then scroll to the bottom and click the big blue button marked "Next". On the next page fill in your details and then click "Continue". You will then get an email with the download link.

The coastline in the OS Boundary-Line data is a high-res representation of the mean high water. However, it is a polyline. Do not try to convert this to a polygon. Britain is composed of a convoluted coastline and thousands of satellite islands, peninsulas and rocky out-crops. This means that even a seriously powerful computer is likely to fail to stitch the polyline into a set of polygons (I know because I've tried!). Use one of the political boundary maps instead and dissolve all the polygons to get just the coast.

A great alternative is either the OSM data already mentioned in another reply or the GSHHG shorelines dataset (formerly known as GSHHS). This is global but comes in a series of resolutions. It is a big download though.


I use http://openstreetmapdata.com/data/coastlines

It's in lat/long format, rather than OSGR format.

It covers the entire planet, but Shapefiles are a fairly simple format, so it's possible to write a smallish program to filter by latitude and longitude.


For the best resolution delineation of UK coastlines, use the OS Open boundaryline product. It's free and is far more accurate than other delineations online.

The only issue is it comes supplied as regional inland polygons (based on council or borough areas). The coastal stretches of these polygons are what you want. So I would download the data then:

  1. Dissolve all the polygons into one MULTIPOLYGON (or ST_UNION the geometry column in postgis)
  2. Convert the new MULTIPOLYGON into a MULTILINESTRING
  3. ST_DUMP or convert this into separate LINESTRINGs
  4. For better performance, split the coastline LINESTRING into equal 100m long segments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.