OS Terrain 50

This page lists the methods that deal with loading the OS Terrain 50 data set.

Alphabetical list:

Accessing the data

nevis.gb(downsampling=None)[source]

Returns an array of elevation data for Great Britain, with height in meters and grid points spaced 50m apart.

Array indices are (height, width), also known as (northings, eastings).

A downsampled version can be returned for testing purposes, by setting downsampling to any integer greater than one.

nevis.spacing()[source]

Returns the spacing between any two grid points.

Checking if points are sea or just below sea-level

nevis.inland_below_sea_level()[source]

Returns a list of points (x, y) in meters that are below sea-level, but which nevis’s preprocessing did not consider to be “sea”.

nevis.is_sea(coords)[source]

Returns True if and only if the given nevis.Coords were classified as “sea” by nevis’s pre-processing.

Downloading the data

nevis.download_os_terrain_50(force=False)[source]

Downloads, unpacks and processes the OS Terrain 50 data set.

If a previously downloaded zip file is found then the downloading step is skipped, unless force is set to True.

If a previously unpacked and processed file is found, this method does nothing unless force is set to True.

class nevis.DataNotFoundError[source]

Raised when the OS Terrain 50 data is not found.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.