3D Scenes¶
Native application path: gRPC for live data and edits; PMTiles, GeoParquet and COG through the CDN. Start there for browser gRPC-Web setup, signed private URLs and regeneration after changes. OGC API and GeoServices REST examples below are compatibility workflows.
SceneClient (reached through client.scenes()) is a data-access client for
Honua's 3D scene catalog (scene.catalog) and 3D Tiles serving
(serve.3d-tiles-scene). It discovers scene metadata, resolves render-ready
tileset and terrain URLs, fetches tileset.json documents, and downloads tile
assets. It does not perform 3D rendering.
Runnable example¶
The checked-in
examples/scene_catalog.py
script walks the catalog end to end:
- Lists available scenes with
client.scenes().list_scenes(). - Fetches one scene's metadata with
get_scene(scene_id). - Resolves render-ready endpoints with
resolve_scene(scene_id). - Downloads
tileset.jsonwithget_tileset(scene_id)and prints the root bounding volume and child count. - With
--i3s, fetches and prints the I3SSceneServer/layers/0descriptor throughfetch_tile(scene_id, "SceneServer/layers/0").
Run it offline against the recorded fixture (no network required):
python examples/scene_catalog.py --offline
python examples/scene_catalog.py --offline --i3s
Run it against a live Honua server (defaults to https://demo.honua.io when
HONUA_BASE_URL is unset):
HONUA_BASE_URL=https://demo.honua.io python examples/scene_catalog.py
Verify the offline smoke test from the repository root:
pytest tests/examples/test_scene_catalog_example.py
Minimal Python snippet¶
from honua_sdk import HonuaClient
from honua_sdk.protocols import enumerate_tileset_contents
with HonuaClient("https://demo.honua.io") as client:
scenes = client.scenes()
catalog = scenes.list_scenes()
scene_id = catalog[0].id
metadata = scenes.get_scene(scene_id)
resolution = scenes.resolve_scene(scene_id)
tileset = scenes.get_tileset(scene_id)
root = tileset.get("root", {})
print(metadata.name, resolution.tileset_url)
print("Bounding volume:", root.get("boundingVolume"))
print("Root children:", len(root.get("children", [])))
print("Content references:", len(enumerate_tileset_contents(tileset)))
Optional I3S SceneServer layer document¶
When a server enables I3S serving (serve.i3s-scene), fetch_tile() can read
the layer descriptor at SceneServer/layers/0:
import json
from honua_sdk import HonuaClient
with HonuaClient("https://your-honua-server.com") as client:
response = client.scenes().fetch_tile("downtown-honolulu", "SceneServer/layers/0")
layer_doc = json.loads(response.content.decode("utf-8"))
print(layer_doc["layerType"], layer_doc["version"])
I3S serving is Enterprise-gated on Honua Server; servers without that
entitlement return HTTP 402 or omit I3S endpoints.