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

> Reference material for ST_ASBINARY function

# ST_ASBINARY

Converts shapes of the `GEOGRAPHY` data type to the [Well-Known Binary (WKB)](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary) format for geographic objects.

## Syntax

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
ST_ASBINARY(<object>)
```

## Parameters

| Parameter  | Description                                      | Supported input types |
| :--------- | :----------------------------------------------- | :-------------------- |
| `<object>` | The `GEOGRAPHY` object to convert to WKB format. | `GEOGRAPHY`           |

## Return Type

`ST_ASBINARY` returns a value of type `BYTEA`.

## Example

The following query uses `ST_GEOGFROMTEXT` to create a `GEOGRAPHY` object from the WKT representation of a Point at specified longitude and latitude coordinates, and then uses `ST_ASBINARY` to convert it to WKB representation:

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT ST_ASBINARY(ST_GEOGFROMTEXT('POINT(-73.98551041593687 40.75793403395676)')) AS result
```

**Returns**

| result (BYTEA)                                 |
| :--------------------------------------------- |
| '\x01010000003d94479a127f52c0502f80fb03614440' |
