openworld_radio_twin.providers.registry#

Trusted, installed building providers shared by library, batch and HTTP APIs.

Functions

in_berlin(latitude, longitude)

Berlin state routing boundary, excluding the surrounding Brandenburg area.

in_boston(latitude, longitude)

Boston municipal routing boundary, excluding neighbouring municipalities.

in_netherlands(latitude, longitude)

Classify the query centre using the official, unsimplified country polygon.

worldwide(latitude, longitude)

Classes

BuildingProvider(*args, **kwargs)

BuildingSource(identifier, title, version, ...)

Provider identity and factory; auto-selection is explicitly opt-in.

BuildingSourceRegistry([sources])

class openworld_radio_twin.providers.registry.BuildingProvider(*args, **kwargs)[source]#

Bases: Protocol

async buildings(latitude, longitude, radius_m, limit)[source]#
Return type:

BuildingQueryResult

openworld_radio_twin.providers.registry.worldwide(latitude, longitude)[source]#
Return type:

bool

openworld_radio_twin.providers.registry.in_netherlands(latitude, longitude)[source]#

Classify the query centre using the official, unsimplified country polygon.

Return type:

bool

openworld_radio_twin.providers.registry.in_boston(latitude, longitude)[source]#

Boston municipal routing boundary, excluding neighbouring municipalities.

Return type:

bool

openworld_radio_twin.providers.registry.in_berlin(latitude, longitude)[source]#

Berlin state routing boundary, excluding the surrounding Brandenburg area.

Return type:

bool

class openworld_radio_twin.providers.registry.BuildingSource(identifier, title, version, factory, covers=<function worldwide>, auto_priority=None, attribution='', license_url='', configuration_identity=None, auto_covers=None)[source]#

Bases: object

Provider identity and factory; auto-selection is explicitly opt-in.

covers receives (latitude, longitude). Higher auto_priority wins; None leaves a source available only by explicit selection. Version changes must accompany changes in source interpretation or geometry reconstruction. auto_covers can restrict default routing without narrowing explicit acquisition, whose tile/archive coverage is still checked by the provider.

identifier: str#
title: str#
version: str#
factory: Callable[[Settings, AsyncClient], BuildingProvider]#
covers(longitude)#
Return type:

bool

auto_priority: int | None = None#
attribution: str = ''#
license_url: str = ''#
configuration_identity: Callable[[Settings], dict[str, str]] | None = None#
auto_covers: Callable[[float, float], bool] | None = None#
class openworld_radio_twin.providers.registry.BuildingSourceRegistry(sources=())[source]#

Bases: object

register(source)[source]#
Return type:

None

load_installed()[source]#

Load explicitly installed entry points, never a request-supplied import path.

Return type:

None

get(identifier)[source]#
Return type:

BuildingSource

automatic(latitude, longitude, *, allowed=('3dbag', 'berlin', 'boston'))[source]#
Return type:

BuildingSource | None

describe()[source]#
Return type:

list[dict[str, object]]