blighty {blighty}R Documentation

British Isles Coastlines

Description

Function for drawing the coastlines of the British Isles

Usage

blighty(place, grid=FALSE, xlimits, ylimits, xpadding=0, ypadding=0, parcol, parbor, parwdh, sarcol, sarbor, sarwdh, parang, parden, sarang, sarden, tlncol, tlnwdh, grdcol, grdwdh)

Arguments

place map set - a list of objects to plot - see notes - default - "set.UK"
grid TRUE or FALSE - places a grid in OS km over the map - default - FALSE
xlimits vector of limits in OS km in which to draw the map
ylimits vector of limits in OS km in which to draw the map
xpadding kms to leave to either side between the edges and map in the x direction - default = 0
ypadding kms to leave to either side between the edges and map in the y direction - default = 0
parcol primary area colour - "transparent" for no shading - default - par("bg")
parbor primary area colour - "transparent" for invisible - default - par("fg")
parwdh primary area border width - default 1
sarcol secondary area colour - "transparent" for no shading - default - par("bg")
sarbor secondary area colour - "transparent" for invisible - default - par("fg")
sarwdh secondary area border width - default 1
parang angle of hatching lines for primary areas - default NULL - parden must be set to positive if hatching is to appear - look at polygon for further information
parden density of hatching lines for primary areas in lines per inch - default - NULL - parden must be set to positive if hatching is to appear - look at polygon for further information
sarang angle of hatching lines for secondary areas - default NULL - parden must be set to positive if hatching is to appear - look at polygon for further information
sarden density of hatching lines for secondary areas in lines per inch - default - NULL - parden must be set to positive if hatching is to appear - look at polygon for further information
tlncol colour of lines for non-area objects - default - par{"fg"}
tlnwdh width of lines for non-area objects - default = 1
grdcol colour of grid lines - default - par{"fg"}
grdwdh width of grid lines - default = 1

Value

returns the object blighty.mapinfo in the global environment to give information for north.pointer and map.scale

Note

Inspired by the package oz, blighty() draws the coastline of many of the British Isles. The output is suitable for general purpose illustrations, distribution diagrams; it is not heavyweight GIS or meant for calculation in any way.

The original coordinates were taken from a scan of a map of England, Scotland and Wales in my 1936 edition of The World of Wonder to avoid any copyright problems. The scan was then imported into xfig and the coastline and internal boundarys were digitised using the polyline function. Each section of coastline was then saved as seperate file. A small amount of hand editing of each file allows them to be read in as coordinate points in R (functions availible from the author and in the /misc directory of the package). The problem with using such an early work from which to take the primary image is that bits which were present then may not be now as coastal errosion may have affected the East of England.

The coordinate system was taken from various easily recognisable points of the UK coastline. The calculated error on these is in 100s of metres, the real error from comparison is about 3km. Still, most features for which a grid reference from an Ordinance Survey map can be plotted on easily.

Unfortunately The World of Wonder did not include a map of Ireland or the Northern Isles, however, the Irish will be delighted to know that I got some suitable maps from a tourest guide to Ireland which will be incorperated into the next release as soon as I can get a grid system to tie Ireland into mainland Britain. For blighty_2-0.0 the Orkneys and Shetlands added. They can be displayed using "set.Scotland.all".

Don't use the xlimits and ylimits to zoom in too far as the point resolution isn't really up to it. There is now a warning for this - basically the maps start to look bad at anything less than 200km.

It can also take a few seconds when drawing all of the British Isles, this is mainly because of the west coast of Scotland and Western Isles which because of their shape take up loads of data points.

For blighty_2-0.0 the maps have been hand edited to tidy them up a lot, the Scilly Isles and Lundy have been added, various inconsistencies have been fixed, and the examples changed.

At the request of numerous people there are now a set of primitive tools in the package \misc directory to enable people to construct and use their own maps. To get this download the source blighty_x.y-z.tar.gz to a directory, tar -zxvf it, then look in the blighty_x.y-z.tar.gz/misc directory - although it is part of the distribution it is not installed as such, therefore needs manual unpacking.

New functions which draw scales and North pointers have also been added as from blighty_2-0.0.

Basically blighty is an elborate wrapper for polygon and points with some data files added. As such it will plot more or less any sets of coordinate points - so is by no means restricted to the distributed objects. At the moment it has three object types (although more can easily be added), one is a primary area - used for a landmass, the secondary area is a shaope within the landmass, such as a lake, the tertiary feature type is a non-area type such as a river. The type of feature is encoded into the data files, blighty() then knows how to treat the object. Unfortunately secondary area objects will not cut out an area of the primary objects - so unless the parent primary area object is "transparent", the secondary area object can be "transparent", but it will merely show the primary area colour. It would be good to rectify this, but I can see no way at the moment of doing so with the present data structure.

Additional place sets are: "set.all", "set.England", "set.Wales", "set.Scotland" and "set.Scotland.all", although it is simple to specify your own - see additional documentation in \misc directory.

Author(s)

David Lucy <dlucy@maths.ed.ac.uk>http://www.maths.ed.ac.uk/~dlucy/

See Also

map.scale north.pointer oz

Examples

blighty()               # UK coastline
blighty(grid=TRUE)      # UK coastline with grid
points(399,91)          # add in Poole OS coords last digit is 1km
text(400,50,"Poole")

blighty("set.Scotland") # Scotland and the Western Isles
points(327, 672)        # OS coords for Authurs Seat
text(327, 655, "Edinburgh")

blighty("set.Wales")    # Wales and Anglesey

blighty("set.England", xlimits=c(400,600), ylimits=c(50, 200))
box()                   # south of England and the Isle of Wight
                        # and the Thames Estuary

blighty()               # do a plot then add the capital cities

x <- c(532, 327, 317)   # make up two vectors of points
y <- c(181, 672, 175)   # for capital cities

names <- c("London", "Edinburgh", "Cardiff") # vector of names
 
points(x,y, col="red")  # add in the points in red
 
text(x + 20, y, labels=names, adj=0)
                        # add some labels displaced by 20km to the right

blighty(parcol="gray")  # use a basic shading

blighty("set.Scotland", parcol="blue", parbor="red", sarcol="red", tlncol="green", tlnwdh=3)
                        # looks hideous but demonstates some of the shading
                        # functions

blighty(parang=45, parden=30, parbor="transparent", parcol="black", sarbor="transparent", tlncol="transparent")
                        # more of a picture for logos etc

[Package blighty version 2.0-0 Index]