> ## Documentation Index
> Fetch the complete documentation index at: https://docs-v2.ard.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Layer Definitions

> Crystal layer definitions stored in MongoDB

Crystal stores layer definitions in MongoDB. Each layer includes:

* **`query`**: ModMS query expression
* **`style`**: Map styling parameters (min, max, step, fill, colormap, etc.)

## Access Layer Definitions

**Endpoint:**

```bash theme={null}
curl -u crystal:CLandSky http://crystal.arabiaweather.com/layers
```

**Authentication:**

* Username: `crystal`
* Password: `CLandSky`

## Layer Structure

**Example layer:**

```json theme={null}
{
  "name": "GFS 200HPA WIND",
  "query": "speed(GFS.ISO200HPA.UGRD, GFS.ISO200HPA.VGRD) | dir(GFS.ISO200HPA.UGRD, GFS.ISO200HPA.VGRD)",
  "style": {
    "min": 0,
    "max": 100,
    "step": 1,
    "fill": "gradient",
    "contour": false,
    "vector": "vector",
    "colormap": "shakerwind",
    "numgrid": false,
    "linewidth": 2
  }
}
```

## Layer Components

### Query Field

The `query` field contains a ModMS query expression that defines what data to retrieve. This follows the same syntax as ModMS queries.

### Style Field

The `style` object contains all the map styling parameters:

* `min`: Minimum value for color scale
* `max`: Maximum value for color scale
* `step`: Step size for color bands
* `fill`: Fill style (`gradient`, `band`, `none`)
* `contour`: Enable contour lines (`true`/`false`)
* `vector`: Vector overlay style (`none`, `vector`, `barb`, `direction`)
* `colormap`: Color scheme name
* `numgrid`: Show grid point values (`true`/`false`)
* `linewidth`: Contour line width

## Related Documentation

* [Map Drawing Guide](/data-ai/modms/map-drawing) - How to generate map images from ModMS
* [Crystal Overview](/data-ai/legacy-met-tools/crystal) - Crystal service documentation
