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

# ST_GeogFromWKB

> Constructs a native GEOGRAPHY value from WKB.

Constructs a native `GEOGRAPHY` value from Well-Known Binary (WKB).

## Syntax

```sql theme={null}
GEOGRAPHY ST_GeogFromWKB(VARBINARY wkb)
GEOGRAPHY ST_GeogFromWKB(VARBINARY wkb, INT srid)
```

## Parameters

* `wkb`: A two-dimensional OGC WKB value in little-endian or big-endian byte order. All seven OGC geometry families and `EMPTY` members are supported. EWKB extensions are not supported.
* `srid`: Optional. The spatial reference identifier. Only `4326` is supported; when omitted, it defaults to `4326`.

Coordinates use spherical `OGC:CRS84` semantics: longitude must be in `[-180, 180]` and latitude in `[-90, 90]`.

## Return value

Returns a `GEOGRAPHY` value. Returns `NULL` if an argument is `NULL`, the WKB is invalid, a coordinate is outside the supported range, or `srid` is not `4326`.

## Example

```SQL theme={null}
SELECT ST_AsText(ST_GeogFromWKB(unhex('0101000000000000000000F03F0000000000000040')));
```

```text theme={null}
POINT (1 2)
```

## Keywords

ST\_GEOGFROMWKB, GEOGRAPHY, WKB

## Related data types

[GEOGRAPHY](/documents/4.2/sql-reference/data-types/spatial-types/GEOGRAPHY.md), [VARBINARY](/documents/4.2/sql-reference/data-types/string-type/BINARY.md), [INT](/documents/4.2/sql-reference/data-types/numeric/INT.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.