Back to prompt library
Build a CityJSON to BCF Coordination Issue Dispatcher — implementation
Linked challenge: Build a CityJSON to BCF Coordination Issue Dispatcher
Prompt source
implementation120 lines11 sectionsNo variables1 code block
## Build
Parse urban building models in CityJSON format to detect missing spatial metadata and register structured coordination tickets. Generate compliant BCF-XML action issues for project engineering teams.
## User
Urban GIS Coordinator
## Workflow
1. Ingest CityJSON payload containing CityObjects, vertices, and coordinate transform parameters.
2. Validate geographic extent and child-parent object topology for registered building installations.
3. Identify unlinked children and missing height attributes across building entities.
4. Synthesize BCF issue records with proposed geometry fixes for BIM coordinator review.
## Interface
Web dashboard showing CityJSON hierarchy tree, issue highlights, and BCF-XML export button.
## Data
Download open CityJSON v2.0 sample models from cityjson.org or provide mock json fixtures.
Starter examples below are synthetic. They are not downloaded records.
## Source
[CityJSON](https://www.cityjson.org/specs/2.0.1/)
Utilizes CityJSON specification section 1 and 2 for CityObjects, attributes, geographicalExtent, and parent-child hierarchy schema.
## Tools
pydantic-ai, fastapi, pytest.
Pydantic AI enforces type-safe schemas across parsed CityJSON structures and target BCF issue payloads.
Fast structured JSON generation model with strict schema validation via API or local vLLM.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- CityObjects are successfully parsed into typed models with geographicalExtent extracted.
- Unlinked 2nd-level entities lacking valid parent references trigger validation tickets.
- BCF issue payload emits required topic uuid, priority, and suggested attribute remedy.
## Starter Examples
```json
[
{
"input": {
"type": "CityJSON",
"version": "2.0",
"transform": {
"scale": [
1,
1,
1
],
"translate": [
0,
0,
0
]
},
"CityObjects": {
"b-101": {
"type": "Building",
"geographicalExtent": [
10,
20,
0,
30,
40,
15
],
"attributes": {
"measuredHeight": 15
},
"children": [
"bi-101-a"
]
},
"bi-101-a": {
"type": "BuildingInstallation",
"parents": [
"b-101"
]
}
},
"vertices": []
},
"expected_output": {
"status": "valid",
"issues_detected": 0,
"bcf_topics": []
}
},
{
"input": {
"type": "CityJSON",
"version": "2.0",
"transform": {
"scale": [
1,
1,
1
],
"translate": [
0,
0,
0
]
},
"CityObjects": {
"bi-orphan": {
"type": "BuildingInstallation",
"parents": []
}
},
"vertices": []
},
"expected_output": {
"status": "invalid",
"issues_detected": 1,
"bcf_topics": [
{
"topic_id": "ERR-TOPOLOGY-01",
"description": "2nd-level CityObject bi-orphan lacks required parent building reference",
"severity": "critical"
}
]
}
}
]
```
## Safety
Does not apply modifications directly to production municipal cadastres; produces reviewable issue tickets only.
Use mock external writes. Require human review before any real deployment.