Skip to main content
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:
curl -u crystal:CLandSky http://crystal.arabiaweather.com/layers
Authentication:
  • Username: crystal
  • Password: CLandSky

Layer Structure

Example layer:
{
  "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