A computer implemented method of pre-processing data representing a triangle elevation mesh to encode the data in a manner suitable for data compression, the method comprising: receiving elevation mesh data comprising a two-dimensional array of Z values associating points on a regular uniform X-Y grid with a height value or values indicating that no height data is associated with that point on the grid; selecting groups of data points at positions (x,y), (x,y+1), (x+1,y) and (x+1, y+1) in the array corresponding to pairs of adjacent triangles in the mesh in an order which traverses the mesh; checking whether data points selected for encoding are associated with height values; and encoding data for a triangle only if all the data points selected for encoding are associated with height data by: determining for each data point whether data corresponding to the selected data point has previously been encoded and if not encoding data for the selected data point by storing data defining a vector identifying the position identified by the x and y co-ordinates for the selected data point and the z value associated with the x and y co-ordinates wherein the vector comprises: a vector identifying the absolute position identified by a data point in the case of a first data point of a group of three data points defining a triangle in a triangle mesh; or a vector identifying the relative position identified by a data point relative to the position of previously encoded data identified by other data points in a group of data points in the case of subsequent data points in a group of three data points defining a triangle in a triangle mesh. receiving elevation mesh data comprising a two-dimensional array of Z values associating points on a regular uniform X-Y grid with a height value or values indicating that no height data is associated with that point on the grid; selecting groups of data points at positions (x,y), (x,y+1), (x+1,y) and (x+1, y+1) in the array corresponding to pairs of adjacent triangles in the mesh in an order which traverses the mesh; checking whether data points selected for encoding are associated with height values; and encoding data for a triangle only if all the data points selected for encoding are associated with height data by: determining for each data point whether data corresponding to the selected data point has previously been encoded and if not encoding data for the selected data point by storing data defining a vector identifying the position identified by the x and y co-ordinates for the selected data point and the z value associated with the x and y co-ordinates wherein the vector comprises: a vector identifying the absolute position identified by a data point in the case of a first data point of a group of three data points defining a triangle in a triangle mesh; or a vector identifying the relative position identified by a data point relative to the position of previously encoded data identified by other data points in a group of data points in the case of subsequent data points in a group of three data points defining a triangle in a triangle mesh. determining for each data point whether data corresponding to the selected data point has previously been encoded and if not encoding data for the selected data point by storing data defining a vector identifying the position identified by the x and y co-ordinates for the selected data point and the z value associated with the x and y co-ordinates wherein the vector comprises: a vector identifying the absolute position identified by a data point in the case of a first data point of a group of three data points defining a triangle in a triangle mesh; or a vector identifying the relative position identified by a data point relative to the position of previously encoded data identified by other data points in a group of data points in the case of subsequent data points in a group of three data points defining a triangle in a triangle mesh. a vector identifying the absolute position identified by a data point in the case of a first data point of a group of three data points defining a triangle in a triangle mesh; or a vector identifying the relative position identified by a data point relative to the position of previously encoded data identified by other data points in a group of data points in the case of subsequent data points in a group of three data points defining a triangle in a triangle mesh.