# projections Property

Vega `projections` map longitude and latitude data to projected `x` and `y` coordinates. When working with geospatial data in OmniSci, you can use projections to define geographic points and regions.

General `projections` property JSON format:

```
"projections": [
       {
         "name": "<projectionName>",
         "type": "<projectionType>",
         "bounds": {
               "x": [<minLong>,<maxLong>],
               "y": [<minLat>,<maxLat>]
         }
       }
]
```

When you specify a projection, you must reference it in the [Marks Property](https://docs.heavy.ai/v8.3.0/apis-and-interfaces/vega/vega-reference-overview/marks-property) using the `transform` object. For example, if you define the projection `my_mercator_projection`:

```
"projections": [
{
   "name": "my_mercator_projection",
   "type": "mercator",
   "bounds": {
     "x": [-120.0, 120.0],
     "y": [-20.0,20.0]
   }
 }
 ]
```

you then reference it as follows:

```
"marks": [
{
   "type": "symbol",
   "from": { "data": "fec_contributions_oct" },
   "properties": { ... elided ... }
   "transform": {
      "projection": "my_mercator_projection"
   }
 }
 ]
```

The projections specification has the following properties:

| Property | Data Type | Required | Description                                                                                                                                                                           |
| -------- | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`   | string    | X        | User-assigned name of the projection.                                                                                                                                                 |
| `type`   | string    | X        | <p>Projection type. Currently supported types:</p><ul><li><code>mercator</code>: Mercator map projection.</li></ul>                                                                   |
| `bounds` | object    |          | <p>Specifies the longitude and latitude bounding box for the projection. Default values:</p><ul><li><code>x</code>: \[-180.0, 180.0]</li><li><code>y</code>: \[-85.0, 85.0]</li></ul> |

### Example <a href="#example" id="example"></a>

Use Vega projection `projection` alongside array columns:

```
{
      "width": 1024,
      "height": 1024,
      "data": [
              {
                      "name": "table",
                      "sql": "SELECT rowid, coords[1] as x, coords[2] as y FROM cities WHERE coords[1] BETWEEN $minLon AND $maxLon AND coords[2] BETWEEN $minLat AND $maxLat"
              }
      ],
      "projections": [
      {
              "name": "projection",
              "type": "mercator",
              "bounds": {
              "x": [-120.0, 120.0],
              "y": [-20.0, 20.0]
              }
      }
      ],
      "scales": [
      ],
      "marks": [
              {
                      "type": "symbol",
                      "from": {"data": "table"},
                      "properties": {
                              "shape": "circle",
                              "xc": {
                                      "field": "x"
                              },
                              "yc": {
                                      "field": "y"
                              },
                              "fillColor": "darkblue",
                              "width": 25,
                              "height": 25
                      },
                      "transform": {
                              "projection": "projection"
                      }
              }
      ]
}
```


---

# 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.heavy.ai/v8.3.0/apis-and-interfaces/vega/vega-reference-overview/projections-property.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.
