feat: add CFD/radiance/urban/community schema files, pres, docs

This commit is contained in:
ringo
2026-05-28 15:06:30 +08:00
parent 9f730223ce
commit 68bb9e2181
40 changed files with 11373 additions and 686 deletions
+321
View File
@@ -0,0 +1,321 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "bps/community",
"title": "Community-Scale Geometry Schema",
"description": "Community/site scale geometry: site boundaries, terrain, roads, green spaces, and water bodies. Energy, CFD, and other simulation parameters are in separate schema-community-*.json files.",
"$defs": {
"_IdentifiedObject": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"pattern": "^[.A-Za-z0-9_-]+$",
"minLength": 1,
"maxLength": 100
},
"display_name": {
"type": [
"string",
"null"
]
},
"user_data": {
"type": [
"object",
"null"
]
}
},
"required": [
"identifier"
]
},
"TerrainGrid": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "TerrainGrid"
},
"grid_origin": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 3,
"maxItems": 3
},
"grid_size_x": {
"type": "integer",
"minimum": 1
},
"grid_size_y": {
"type": "integer",
"minimum": 1
},
"cell_size": {
"type": "number",
"exclusiveMinimum": 0
},
"elevations": {
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"type",
"grid_origin",
"grid_size_x",
"grid_size_y",
"cell_size",
"elevations"
],
"additionalProperties": false
}
]
},
"TerrainTIN": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "TerrainTIN"
},
"vertices": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 3,
"maxItems": 3
},
"minItems": 3
},
"triangles": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"minItems": 3,
"maxItems": 3
},
"minItems": 1
}
},
"required": [
"type",
"vertices",
"triangles"
],
"additionalProperties": false
}
]
},
"Road": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "Road"
},
"centerline": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 3
},
"minItems": 2
},
"width": {
"type": "number",
"exclusiveMinimum": 0
},
"surface_material": {
"type": "string",
"default": "asphalt"
}
},
"required": [
"type",
"centerline",
"width"
],
"additionalProperties": false
}
]
},
"GreenSpace": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "GreenSpace"
},
"boundary": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2
},
"minItems": 3
},
"vegetation_type": {
"type": "string",
"default": "grass"
},
"leaf_area_index": {
"type": "number",
"minimum": 0,
"default": 1
}
},
"required": [
"type",
"boundary"
],
"additionalProperties": false
}
]
},
"WaterBody": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "WaterBody"
},
"boundary": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2
},
"minItems": 3
},
"depth": {
"type": "number",
"exclusiveMinimum": 0,
"default": 1
},
"water_temperature": {
"type": "number",
"default": 20
}
},
"required": [
"type",
"boundary"
],
"additionalProperties": false
}
]
},
"Site": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "Site"
},
"boundary": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2
},
"minItems": 3
},
"terrain": {
"oneOf": [
{
"$ref": "#/$defs/TerrainGrid"
},
{
"$ref": "#/$defs/TerrainTIN"
},
{
"type": "null"
}
]
},
"roads": {
"type": "array",
"items": {
"$ref": "#/$defs/Road"
}
},
"green_spaces": {
"type": "array",
"items": {
"$ref": "#/$defs/GreenSpace"
}
},
"water_bodies": {
"type": "array",
"items": {
"$ref": "#/$defs/WaterBody"
}
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
}
}
}