---
title: fromWKB (Geography)
description: "Geography.fromWKB class in PySpark: Constructs a Geography object from WKB."
canonical_url: https://docs.databricks.com/aws/en/pyspark/reference/classes/geography/fromWKB
---

# fromWKB (Geography)

Constructs a `Geography` object from WKB.

## Syntax

```
Geography.fromWKB(wkb: bytes, srid: int)
```

## Parameters

| Parameter | Type  | Description                                               |
| --------- | ----- | --------------------------------------------------------- |
| `wkb`     | bytes | The bytes representing the WKB of the Geography.          |
| `srid`    | int   | The integer value representing the SRID of the Geography. |

## Returns

`Geography`

## Examples

```python
from pyspark.sql.types import Geography
wkb = bytes.fromhex('010100000000000000000031400000000000001c40')
g = Geography.fromWKB(wkb, 4326)
```
