Skip to main content

overture-schema

Type-safe Python models for Overture Maps Foundation data.

This package provides Pydantic models for validating and working with Overture Maps data, including buildings, places, addresses, transportation networks, and administrative boundaries.

Installation

pip install overture-schema

overture-schema is a metapackage: it pulls in every theme package plus the validation library and the CLI, and ships no code of its own. overture.schema is a namespace root, so import from the theme and system packages rather than from overture.schema directly.

Usage

Import models from the theme package that defines them:

from overture.schema.buildings import Building
from overture.schema.places import Place

Tabular data, and GeoJSON for compatibility

Overture publishes data in one shape: flat and tabular -- the column layout of the Parquet release, with theme, type, and version as top-level columns and geometry as WKT. That is what Python mode (model_validate) reads.

The models also accept and emit GeoJSON, through JSON mode (model_validate_json), so the schema works with tools that expect features rather than rows. The generated JSON Schema describes that representation.

The modes are not interchangeable. Passing a GeoJSON dict to model_validate reports theme/version missing and type set to 'Feature', because it is reading GeoJSON keys as flat columns.

# Flat / tabular (Parquet-shaped) dict
building = Building.model_validate(feature_row)

# GeoJSON -- JSON mode, from a string or bytes
building = Building.model_validate_json(geojson_text)

# Serialize back to GeoJSON. by_alias=True is required: without it,
# aliased fields serialize under their Python names (`class_`, not
# `class`) and the output will not re-validate.
geojson_output = building.model_dump(mode="json", by_alias=True, exclude_none=True)

Available Models

Each model lives in its theme package. The metapackage installs all of them:

from overture.schema.addresses import Address
from overture.schema.base import (
    Bathymetry,
    Infrastructure,
    Land,
    LandCover,
    LandUse,
    Water,
)
from overture.schema.buildings import Building, BuildingPart
from overture.schema.divisions import Division, DivisionArea, DivisionBoundary
from overture.schema.places import Place
from overture.schema.transportation import Connector, Segment

Segment is a discriminated union alias rather than a class, so it validates through a TypeAdapter:

from pydantic import TypeAdapter

segments = TypeAdapter(Segment)
segment = segments.validate_json(geojson_text)

Validating without knowing the type

overture-schema-validation validates against the union of every installed model, picking the right one from the data:

from overture.schema.validation import validate, validate_json

feature = validate(feature_row)  # flat / tabular dict
feature = validate_json(geojson_text)  # GeoJSON

Discovering models programmatically

Discovery lives in overture-schema-system. discover_models() returns a dict keyed by ModelKey -- entry point name, its entry_point value, and the set of tags attached during discovery:

from overture.schema.system.discovery import discover_models, get_registered_model

all_models = discover_models()
# {
#   ModelKey(name="building", entry_point="overture.schema.buildings:Building",
#            tags=frozenset({"feature", "overture", "overture:theme=buildings"})): Building,
#   ModelKey(name="place", entry_point="overture.schema.places:Place",
#            tags=frozenset({"feature", "overture", "overture:theme=places"})): Place,
#   ...
# }

building_model = get_registered_model("building")  # None if not installed

Generating JSON Schema

from overture.schema.system.json_schema import json_schema

schema = json_schema(Building)
union_schema = json_schema(Building | Place)  # emits an anyOf

See the overture-schema-system README for tag format, tag providers, and the discovery API in full.

Metadata

Release files for overture-schema 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for overture-schema 2.0.0
File Size Uploaded
overture_schema-2.0.0.tar.gz 2.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for overture-schema 2.0.0
File Interpreter ABI Platform
overture_schema-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 kB

Release files / overture_schema-2.0.0.tar.gz

Download URL overture_schema-2.0.0.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
487976d74482b4d46826db23f9588f0ded6b2a0171d0b98ef638d2b1a544ca5e
BLAKE2b-256 checksum
How to use checksums
cba558bc2592644ca1a45e90e7cd0550fd6c49b60d26079c718be770acedefe3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release files / overture_schema-2.0.0-py3-none-any.whl

Download URL overture_schema-2.0.0-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b1371ba816bc07ecd7279c444d18bf41ad18ff7a03c6e99661edf2a9e2363b8e
BLAKE2b-256 checksum
How to use checksums
20d9d54b4c003eadeee590c979058714458279cebfa05d194d003a8cee0ccc91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page