Use collection layers and the ontology#
Collections can hold layers of records with revisions. An ontology maps concepts onto layer properties so you can query by concept.
Prerequisites#
A connected client (Use the Python client). Reads need
services:read, changes needcollections:manage, and publishing an ontology version needsontology:publish.MCP tools:
collection_layers_list,collection_layer_read,ontology_get,ontology_search.
Collections and layers#
for collection in client.layers.collections().items:
print(collection.id, collection.name)
layers = client.layers.list("coastal-survey")
layer = client.layers.get("coastal-survey", "vessels")
page = client.layers.records("coastal-survey", "vessels", limit=50)
Call |
REST |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Listings page with after and limit. A batch holds at most 100 records and can carry
expected_watermark to reject concurrent writers.
Ontology#
from geonemo.client.layers import SemanticQuery
result = client.layers.search(
SemanticQuery(ontology_version="coastal-v1", concept="Vessel")
)
Call |
REST |
|---|---|
|
|
|
|
|
|
Result#
Reads return typed pages and views. See Collection layers API.