Вы находитесь на странице: 1из 15

Q.

Creating a point map within MapInfo


The process of creating a point map is appreciably more straightforward than that of
creating a thematic map !
Section N has already included a demonstration of how to import point data from
excel into MapInfo, and how to register this point data to British co-ordinates for
incorporation into a GIS map.
Such a data table may immediately be shown within MapInfo as a point map.
To create such a point map firstly, open a point data file within MapInfo, as
previously described. A table window will appear on screen - as below.

Use the main menu option


table

create points

Choose the table you wish to create map point locations for. Set projections to
British - as previously described.

page 48

Now, Go into layer control, and click on the add a layer button option. Choose the
table you want to add to the map ie your point map table.

Back in the layer control menu box, highlight your new table and click on display.
Then click on style override. Click on the icon and colour boxes to change the look
of your map points.

Choose a symbol style. Click OK through menu options. Your map point locations
will now appear on map.

page 49

18. Linking postcodes to grid references and


ward codes using Excel and Access.
Postcoded NHS data sets
NHS birth, death, hospital inpatient, FHSA register, and other individual patient data
sets all include the home address postcode of the patient. Such data sets include a
separate row of data for each patient record. Within some tables each patient is
unique. In others, an individual patient may have several records within a table.
The postcode field of data may be linked to a grid reference, ward code, HA, LA, ED
or other geographical area code using a postcode look up file.
Postcoders
A number of postcode look up tables and packages are available for sale. The NHS,
through the organisational codes CD Rom receives a free postcoder. This provides
100 metre accuracy grid references for UK postcodes. It is based on the widely used
post office PAF file.
However, ONS introduced a new 'Gridlink' postcode file in 2001, in a consortium
project. This postcode lookup file provides 1 metre grid reference accuracy, and
additionally enables more accurate ward links to be made. Each postcode is allocated
a grid reference to within 1 metre of the central property sharing that postcode.
Office buildings, eg a GP practice, typically receive their own unique postcode.
For a small charge (approx. 150), NHS organisations can purchase gridlink annually
for their local area.
Other more sophisticated packages are available. For example, Address Point
provides a front door grid reference for every house on a street. However, for
confidentiality, most NHS data sets do not include the full address information
required for this postcode - grid reference link to be made. The product is
additionally extremely expensive.
Thus, thus guide describes how to link a postcode file to a NHS data file using the
best available NHS product - namely 'gridlink'.
How to add a ward code and grid reference to a postcoded data set
Any excel file of patient records, or indeed access or other database table, can be
linked to the 'gridlink' postcode reference file to allocate individual patient records
with a ward code and grid reference co-ordinates.

page 50

The process of creating this new file of data is as follows.


1. Import both the patient data file and the postcode
lookup table file into Access as separate tables.
2. Go into the query section of your Access database
and undertake the following commands :
Click on Query NEW and choose Design view
Choose the two tables you want to link (data and postcode link files)
From the two table boxes presented, drag down the columns of data you want to
include in your final joined data-postcode link table.

Link the two files using postcode as the link (drag the mouse pointer between the two
postcode columns.
You have a choice of join properties, which dictate which records are included on
your final table. For example, if you choose the option 'include all records where
fields are equal', you will loose any data records which cannot match a postcode.
The resulting new table (in tables section) should include your original patient data
set as well as your ward code and grid reference.
This file may now be exported or copied into excel and analysed by ward e.g. as an
aggregated count, as an age standardised ratio and so on. Alternatively, it can be or
imported into MapInfo and analysed either as aggregated ward codes or as individual
patient grid references.

page 51

Using 'gridlink', x and y co-ordinates given are six digits long, and will import
immediately into MapInfo. If you use a PAF postcoder, multiply by 10 in either
excel or MapInfo, so that the GIS understands the codes. The x and y co-ordinate
columns need to be integers for MapInfo to recognise them.

S. Alternative quick and easy postcoder.


Streetmap is one of several web based map packages that will give
you a grid reference (and a local map) for any given postcode. Its
web address is :
http://www.streetmap.co.uk/

Input a postcode, and convert the given data to a grid reference (you also get a map !)

You can now set up a spreadsheet of required data ready for


importing into MapInfo.

page 52

GIS training course exercises

Session 3 exercises (Thematic Mapping)


Session 3 of this course has introduced you to the thematic mapping of health data
sets. Try the following exercises, and consider the questions set.
Exercise 8.
Open the NWHA map table and NWHAPHCDS excel table within MapInfo. Import
the table data. Create a range thematic map based on a given data set. Adapt your
set ranges.
i. Is it easy to lie with statistics in presenting such a theme map ?
Exercise 9.
Open the AreaAward91 map and AreaAwardSMR MapInfo table. Create a thematic
map based on one of the data table columns. Add a legend. Create a layout page for
your map. Save your new theme map in a ..\users\06.. subdirectory workspace.
ii. What issues can you foresee needing to be considered when viewing data at
different map aggregations (eg ward vs ED vs house door step ?), and in urban
vs. rural areas ?
Exercise 10.
Open Workspace A. Using the AreaAConditionA data, create a point
map showing the home location of condition A patients. Overlay
this map on the areaAOS10kmap. Using streetmap, set up a new
excel table, which includes x and y co-ordinates for the Royal
Lancaster Infirmary - LA1 4RP, Westmorland General - LA9 7RG, and
Furness General - LA14 4LF. Save your new theme map in a
..\users\06.. subdirectory workspace.
Exercise 11.
Using the AreaA population data, create a pie thematic map showing elderly
populations per ward. Overlay this map on a deprivation theme map. Create a
layout page for your map. Save your new theme map in a ..\users\06.. subdirectory
workspace.
iii. Do you think maps present problems when seeking to visualise
key themes?
iv. Suggest a range of theme maps of benefit to healthcare
planning.
Exercise 12.
Open the AreaA postcoder and AreaAconditionB tables in excel. Import these
datasets into Access. Create a new data table which contains health data, postcodes,
and wards.
v. What spatial issues could affect analysis of individual patient
health records over time ?

page 53

T.Buffering.
Buffering is a spatial analysis technique
used to select a geographical area for
investigation based around a particular
site or sites of interest.
The analysis of activity within a set
geographical buffer zone, is a feature of a
GIS, which cannot be undertaken within a
traditional relational database.
To create a buffer around an object (point, line or area), undertake the following
procedure.
1. Using layer control, make the top screen cosmetic layer editable by ticking the
box directly beneath the pencil symbol.
2. Highlight the point, line or area you wish to buffer around, by first clicking on the
arrow button, and then on the map object (in this example the location of a
hospital).

3. Using the main menu bar option,


select the option objects buffer
4. Choose the radius, or distance you
wish to buffer from the selected
object (in this example 1 miles).
Choose the smoothness of the buffer
shape (100 maximum)
5. A buffer zone will be created around
your point.

page 54

6. This buffer can be saved as a new digitised boundary within MapInfo, using the
main menu option map save cosmetic objects as a new table.

Alternatively, a buffer can be created around a series of objects, as


shown below.
For example, this could be used to show the area covered within 5
miles of any local hospital, close to a pharmacy, GP practice and so
on.
By double clicking
anywhere within the new
object polygon buffer shape,
a region style dialogue box
appears.
By clicking on the style
option box, the pattern and
colour of the new polygon
can be varied according to
choice.

Newly created data


can now be laid out
in a MapInfo layout
window, for printing
and further analysis.

page 55

U. Point in polygon analysis.


A traditional relational database can analyse, aggregate and summarise health data
which identifies the number of people affected by a given health condition. SQL
(structured query language) is used to organise data for a given set of health condition
codes. However, the database can only analyse data where predefined code groupings
are provided (for example, counting heart condition patients with given heart codes,
or counting patients who live in a particular ward using given geographical codes).
Relational databases are not able to analyse data by geographical area
when a precoded areal unit is not included within the data tables.
However, a GIS is able to link and select data on a screen map to a range
of geographical boundaries. Thus, a GIS package has spatial analysis
functionality which cannot be undertaken within a relational database.
This spatial selection capability is a key to the analytical power of a GIS
and its database performance.
Point in polygon analysis is a technique whereby GIS spatial analysis can be
undertaken to examine, for example, how many patients (suffering from a particular
illness) live within the perimeter of a chosen zone. Buffering, as described in section
T, is a good example of where point in polygon analysis can be undertaken within a
GIS. For example, using a newly created buffer layer, or a vector map layer such as
those created earlier in the course, patient data can be selected according to whether
or not patients live within a set area.

Selection of geographical areas for point in polygon analysis


Section T has illustrated how an artificial
boundary area, or polygon, can be created to
show a set distance, or buffer zone, from a site of
interest. A range of MapInfo tool bar icon
button options can be used to select such data
geographically.
Each of the above highlighted buttons can be used to select point (or area) data on a
MapInfo map window, by geographical location. The functionality of these buttons
is explained as follows.
Whichever of the above selection
button methods is used, the
data which is selected using the
given tool button options can be
viewed, or exported, using the
new browser table button.

page 56

The select button

and the information button

The select button is the default tool used within MapInfo, and has been routinely used
throughout this course. Using the arrow select button to click on any point, area or
line on a map will select that object. However, the chosen layer must be selectable
(click on relevant row within layer control), and the relative sandwiching of layers
within layer control may affect selectability.
Data about a selected item may be viewed using the
information button.

The marquee button


The marquee select button is used
to create a rectangle around a
chosen map area. All objects
within the top most selectable layer
are selected using this approach.
Highlighted, or selected data can be
viewed using the new browser
selection button icon process
described on the previous page.
Note : Where more than one row of
data lies beneath a selected
individual postcode point, the
selected point does not appear on
screen within a red bordered square.
However, this data is still selected
within the data selection table (its a MapInfo foible).

The radius select button


The radius select button is used to
create a buffer zone circle around a
chosen area. The radius diameter
is shown in the bottom left corner
of the screen whilst the radius is
being drawn (in this example a 2
mile buffer around a hospital site).
All objects within the top most
selectable layer are again selected
using this approach. selected data
can be viewed using the new
browser selection button icon.

page 57

The polygon select button


The polygon select button is used to
built an arbitrarily shaped area on
the map, and to select all points
within this polygon shape area.
In this example, all patients within
one polygon zone area, which
crosses wards, have been selected.
By holding down the shift button
whilst clicking with the mouse, data
within several geographical
polygon areas can be selected
using this approach. Selected data
can again be viewed using the new
browser selection button icon.

The boundary select button


The boundary select button is used
to select all points within a given
boundary area. Using the layer
control box, the tool selects data
from the uppermost point data set
and uppermost boundary layer.
In this example, all patients within
one ward have been selected.
Note again : by holding down the
shift button whilst clicking within
wards, data for several geographical
areas can be selected using this
approach. Selected data can be
viewed using the new browser
selection button icon.
This method can be used for analysing data found within your own created buffer
zone map layers.

The deselect button


The deselect button (version 6.5 of MapInfo) deselects all point in polygon selections.

page 58

The invert select button


The invert button (version 6.5 of MapInfo) inverts polygon selections. Hence, it
selects all points not currently selected.
In the following example, all patients with condition A who live more than two miles
away from a particular hospital site have been selected using invert select. In order
to undertake this analysis, postcode patient data was linked to a grid reference and
point mapped. Hospital locations were similarly mapped. A two mile buffer was
created around a selected hospital site. Patients inside this buffer zone were selected
using boundary select. Invert was used to select patients living more than two miles
from the site.

Data for these patients can be


selected using the new
browser selection table.
Within the query table,
clicking on any individual
row of data using the
selection box on the extreme
left of the browser window
will highlight the selected
data point within your main
MapInfo map.

page 59

V.SQL analysis
Database structured query language (SQL), and the range of mathematical options
available using 'boolean logic' (for example, using and - or logical commands),
present a separate training course in themselves.
Typically, within NHS Health Authorities and PCTs, the majority of GIS spatial
analysis is carried out within Excel, Access and Oracle before analysed data is
imported into a GIS package itself.
However, MapInfo has its own structured query language command menus, through
which detailed analysis of data can be undertaken within the GIS package.
Initial examples follows. Experiment yourselves
with further examples.

Use of Query Select


The query select command
enables the user to select a
subset of data based on
information contained within a
particular table of information.
For example, in this example,
patients suffering from condition
A, whose individual patient
records have a particular data
code associated with the record
have been selected.
A mathematical select expression has been created using the menu options. The
resulting subset of activity may be mapped or exported for use outside of a GIS.

Additional use of select arrow


The Select arrow button has already
been used extensively. However,
another application is to use it to select
a number of map shapes which can be
viewed within the map browser.
Query invert selection may be used to
choose all other polygons than those
already highlighted.

page 60

SQL select
The SQL select menu option can be used to select a subset
of data from a column within a particular MapInfo table.
In this respect, SQL select is identical to analysis within
other database packages such as Oracle and Access.
In the following example, SQL select has been used to
select data for condition A, where wards within a HA have
SMRs of above 125 for condition A Results are shown
in a new table browser, which can be saved as a new
MapInfo table, or exported.

Geographical joins
GIS systems such as MapInfo have an extremely powerful analytical SQL capability,
which is similar to that of point in polygon analysis.
Different GIS boundary maps can be spatially linked based on their spatial location.
There are 5 geographic operators which can be used to link map objects. For
example :

Object A contains B used where map Bs centroid is anywhere within Map A


Object A entirely contains B used when Bs boundary entirely within Map A
Object A is within B used where map A centroid is within Map B
Object A is entirely within B used where map A entirely within Map B
Object A intersects B maps A and B overlap to some extent, or fully.

page 61

In the following example, an SQL statement has been used to select wards whose
geographical centre lies within a two mile buffer zone of a hospital site.
For example, where only aggregated population data is available for a significantly
built up urban area, it could be justified that the entire ward population can be
considered for analysis where the majority of a ward lies within a defined buffer zone.

Whilst the above SQL example uses area map data, it could equally be employed to
select patients who live within a boundary area, or areas which have patients.
Thus, whilst SQL is typically used to create a subset of a dataset, it may equally well
be applied to undertake complex geographical queries.

Find tool
The query find tool can be used to find a particular named geographical site, for
example a named ward. Find places a symbol within the searched for geographical
area, and redisplays the map with the attached symbol.

page 62