# Grid data

## ASCII grid and GML <a href="#bookmark4" id="bookmark4"></a>

ASCII grid is a generic, text-based DTM format, which is sometimes referred to as ArcInfo ASCII grid or ArcGrid ASCII. This data can be read by most standard GIS software without additional translation.

Grid data is available to download in ASCII format. ASCII grid data is provided alongside GML data in the OS Terrain 50 data supply. In the gridded data supply, the .gml file effectively provides metadata (such as location, grid spacing and the vertical reference system) to allow ASCII data to be read as GML. It also contains spatial reference information in a software independent form.

## Data structure <a href="#bookmark6" id="bookmark6"></a>

The ASCII data is specified as a raster grid, with each height value being calculated from the centre of each pixel. To represent this in ASCII grid format, the initial coordinates in the map header originate on the north-west corner of the tile. The data is presented in rows that read from west to east, with 200 pixels per row. Each pixel is 50m by 50m, so the next row will begin 50m south of the origin and progress at 50m intervals to the east.

<figure><img src="/files/Wt4iAWrlpBDQR8QuQT4e" alt="Diagram of ASCII data represented as a 10km by 10km tile raster grid of 50m by 50m pixels."><figcaption><p>ASCII data is represented as a 10km x 10km tile raster grid of 50m x 50m pixels</p></figcaption></figure>

The height values are presented in the standard ASCII grid format as a series of real values. The height values are given to the nearest 0.1m.

The structure of the layers provided with the ASCII grid and GML download is outlined in the following table.

| Layer name                 | Layer description                                                                                                                                                                                    |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \<tile name>.asc           | Esri ASCII grid data.                                                                                                                                                                                |
| \<tile name>.gml           | Open Geospatial Consortium (OGC) file for the ASCII grid to enable the data to be loaded as GML format.                                                                                              |
| \<tile name>.prj           | File containing the spatial reference system in a format defined by Esri.                                                                                                                            |
| \<tile name>.asc.aux.xml   | A file which provides parameters to enable default styling in Esri applications. This ensures that the shading is consistent across the data but allows you to apply your own choice of colour ramp. |
| Metadata\_\<tile name>.xml | A metadata file for grid data, providing information on the flying date and so on.                                                                                                                   |

## Data header <a href="#bookmark7" id="bookmark7"></a>

The following is the data header found in the first six rows of the ASCII grid file:

```asciidoc
ncols 200
nrows 200
xllcorner 290000 (example)
yllcorner 80000 (example)
cellsize 50
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.os.uk/os-downloads/products/land-and-terrain-portfolio/os-terrain-50/os-terrain-50-technical-specification/grid-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
