10.2.5.5 Z2G (Zone to Group) etc. Mapping Files

A set of filename conventions has been drawn up in order to identify ASCII text files which define the “mapping” of one set of zonal aggregates into another. Thus a file with extension .Z2G will contain data which specifies which Groups are to be associated with each Zone, .Z2S maps Zones into Sectors, G2S maps groups into sectors, etc. etc.

The following letters may be used: Z for zones, D for districts, B for boroughs and S for sectors (plus, more generally, N for node where the files are being used in networks as in FILN2G; see 5.1.7). In addition T represents “text” so that a .G2T file would consist of a series of group names followed by a text description of that group; e.g., “1 Otley”.

All such files (except the "to text" .?2T files) have the same general, very simple format described as follows:

They consist of a series of text records (terminated by a 99999 record) where each record consists of two integers in free format (i.e., including CSV) specifying a zone followed by its group (where we use the terms “zone” and “group” to denote the first and second quantities as in a Z2G file but the same specifications apply equally to all such files).

Note that numerical “names” must always be used for both the zone and the group - not sequential numbers (although very often names are in fact sequential).

Records need not be in numerical order of zones, i.e., the first number given does not have to be always increasing, although this is generally the most convenient way to create such files.

Duplication (i.e., assigning the same zone to two different groups) is not allowed (although it may not always be checked).

A hyphen in front of a zone name (negative numbers) may be used to indicate a “range” of zones. Thus two successive records:

9    1

-19  2

would indicate that all zone names in the range 10 through 19 would be assigned to group 2 (and that zone 9 would be assigned to group 1).

Note that 19 need not necessarily be a valid zone name itself, it simply represents an upper limit, in which case the “true” upper limit would be the maximum zone name lower than 19. The lower value of the range is the previous upper limit plus one. If a negative number is used to indicate an interval the absolute value of the negative number must be greater than the absolute of the previous number in the list. If, as above, a positive number is used (e.g., 9) to set the previous line that zone name must exist.

Therefore it is recommended that you use either all intervals (negative numbers) or include all zone names in the Z2* file using the philosophy that the point of using intervals is for the process not to fail and the point of using a zone by zone list is that you want the process to warn you about missing elements by failing.

Errors occur and are noted if a record does not consist of two integers, if a zone cannot be identified (excluding negative values above) and if some zones are not assigned to groups. These may or may not result in the operation being rejected.

Blank records are allowed and ignored as are comments, i.e., records with a * in column 1.

In order to process a Z2G file the zone names (and their number) must already be known within MX but the set of group names and their total number are only known and fully specified after the Z2G file has been processed.

Note that the Z2G format also corresponds to a simplified version of the Records 2 used by the batch file MXM5; see Appendix W.3.