---
id: "epsg_code"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["geo"]
langs: ["common"]
quality: 85
url: "http://registry.apicrafter.io/datatype/epsg_code"
---

# EPSG coordinate reference system code (`epsg_code`)

> **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.

Identifier of a coordinate reference system (CRS) in the EPSG Geodetic Parameter Dataset. The regexp covers the forms that name the authority: EPSG:4326, used by PROJ and many GIS tools, the OGC URN urn:ogc:def:crs:EPSG::4326 and the OGC URI http://www.opengis.net/def/crs/EPSG/0/4326. The code itself is a number of four or five digits, and Wikidata stores only that number; a bare number is not covered because it looks like any other number.

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

## Detection

Regular expression (Python `re`):

```
^(?:EPSG:|urn:ogc:def:crs:EPSG::|https?://www\.opengis\.net/def/crs/EPSG/0/)[1-9]\d{3,4}$
```

## Examples

- `EPSG:4326` — WGS 84, geographic 2D
- `EPSG:3857` — WGS 84 / Pseudo-Mercator, projected
- `EPSG:25832` — ETRS89 / UTM zone 32N, projected
- `urn:ogc:def:crs:EPSG::4326` — OGC URN form
- `http://www.opengis.net/def/crs/EPSG/0/4326` — OGC URI form
- `4326` (invalid example) — Bare code without the authority

## Mappings

- wikidata: `P1338`

## Sources

- doc: <https://epsg.org/home.html>
- doc: <https://proj.org/en/stable/apps/projinfo.html>
- wikipedia: <https://en.wikipedia.org/wiki/EPSG_Geodetic_Parameter_Dataset>
- wikidata: <https://www.wikidata.org/wiki/Property:P1338>

## Quality

Score 85/100. Missing: translation, detector coverage.

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