Last active
August 21, 2024 05:39
-
-
Save hugoledoux/81e46b9d42bb84f3f7e6f6e87f9e281f to your computer and use it in GitHub Desktop.
test for extra attributes for Semantics objects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"CityObjects": { | |
"id-1": { | |
"geometry": [ | |
{ | |
"boundaries": [ | |
[ | |
[ | |
0, | |
1, | |
2, | |
3 | |
] | |
], | |
[ | |
[ | |
4, | |
5, | |
0, | |
3 | |
] | |
], | |
[ | |
[ | |
5, | |
6, | |
1, | |
0 | |
] | |
], | |
[ | |
[ | |
6, | |
7, | |
2, | |
1 | |
] | |
], | |
[ | |
[ | |
3, | |
2, | |
7, | |
4 | |
] | |
], | |
[ | |
[ | |
7, | |
6, | |
5, | |
4 | |
] | |
] | |
], | |
"lod": "1.2", | |
"semantics": { | |
"surfaces" : [ | |
{ | |
"type": "WallSurface" | |
}, | |
{ | |
"type": "RoofSurface", | |
"slope": 66.6 | |
}, | |
{ | |
"type": "+ThermalSurface", | |
"azimuth": 71.1 | |
} | |
], | |
"values": [0, 0, 1, 2, 2, 1] | |
}, | |
"type": "MultiSurface" | |
} | |
], | |
"attributes": { | |
"function": "something" | |
}, | |
"type": "GenericCityObject" | |
} | |
}, | |
"type": "CityJSON", | |
"version": "2.0", | |
"vertices": [ | |
[ | |
2000, | |
1000, | |
1000 | |
], | |
[ | |
1000, | |
2000, | |
1000 | |
], | |
[ | |
0, | |
1000, | |
1000 | |
], | |
[ | |
1000, | |
0, | |
1000 | |
], | |
[ | |
1000, | |
0, | |
0 | |
], | |
[ | |
2000, | |
1000, | |
0 | |
], | |
[ | |
1000, | |
2000, | |
0 | |
], | |
[ | |
0, | |
1000, | |
0 | |
] | |
], | |
"metadata": { | |
"geographicalExtent": [ | |
-1.0, | |
-1.0, | |
0.0, | |
1.0, | |
1.0, | |
1.0 | |
] | |
}, | |
"transform": { | |
"scale": [ | |
0.001, | |
0.001, | |
0.001 | |
], | |
"translate": [ | |
-1.0, | |
-1.0, | |
0.0 | |
] | |
}, | |
"extensions": { | |
"Generic": { | |
"url": "https://www.hugo.com", | |
"version": "1.0" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "CityJSONExtension", | |
"name": "Thermal", | |
"uri": "https://www.hugo.com", | |
"version": "0.1.0", | |
"versionCityJSON": "2.0", | |
"description": "Extension to handle GenericCityObject; meant as a template to learn how to construct an Extension", | |
"extraRootProperties": {}, | |
"extraAttributes": {}, | |
"extraCityObjects": {}, | |
"extraSemanticSurfaces": { | |
"+ThermalSurface": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"enum": [ | |
"+ThermalSurface" | |
] | |
}, | |
"azimuth": { | |
"type": "number" | |
} | |
}, | |
"required": [ | |
"type", | |
"azimuth" | |
], | |
"additionalProperties": false | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment