---
id: "wkb"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["geo"]
langs: ["common"]
quality: 90
url: "https://registry.apicrafter.io/datatype/wkb"
---

# Well-known binary (WKB) geometry (`wkb`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Geometry in the well-known binary (WKB) encoding of the OGC Simple Features standard: a byte order flag (0 big-endian, 1 little-endian), a geometry type and the coordinates. GeoParquet and GeoPackage files keep it as bytes; databases and text exports write it as hexadecimal, PostGIS in its extended form (EWKB) with the spatial reference id. The text form is wkt.

- Personal data (PII): no
- Categories: Geographic identifiers (geo)
- Countries: global
- Languages: Common to most languages (common)

## Detection

Regular expression (Python `re`):

```
^(?:00|01)[0-9A-Fa-f]{8}(?:[0-9A-Fa-f]{2})+$
```

## Examples

- `0101000000000000000000F03F000000000000F03F` — POINT (1 1)
- `0101000020E6100000000000000000F03F000000000000F03F` — EWKB POINT (1 1) with SRID 4326
- `POINT (1 1)` (invalid example) — WKT: wkt

## Metacrafter rules

1 rules: 0 match the field name, 1 match values.

- `wkbbyvalue` (data, `common/geo.yaml`)

## Supported by tools

- `metacrafter`

## Translations

- ru: Геометрия WKB

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary>

## Quality

Score 90/100. Missing: mapping (Wikidata, Schema.org, ...).

JSON: <https://registry.apicrafter.io/api/v1/datatypes/wkb.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/geo/wkb.yaml>
