├── .gitignore ├── CITATION.bib ├── LICENSE ├── README.md ├── changelog.md ├── extensions ├── 11 │ ├── extension.schema.json │ ├── generic.ext.json │ ├── manycases.ext.json │ ├── noise.ext.json │ └── potato.ext.json ├── 20 │ ├── extension.schema.json │ ├── noise.ext.json │ └── potato.ext.json └── readme.md ├── misc ├── README.txt └── schema-minifier.py ├── schemas ├── appearance.schema.json ├── cityjson.min.schema.json ├── cityjson.schema.json ├── cityjsonfeature.min.schema.json ├── cityjsonfeature.schema.json ├── cityobjects.schema.json ├── geomprimitives.schema.json ├── geomtemplates.schema.json └── metadata.schema.json └── specs ├── README.md ├── figs ├── co.svg ├── co.txt └── figures.graffle ├── make.py └── specs.bs /.gitignore: -------------------------------------------------------------------------------- 1 | /software/cityjson-info/c++11/build 2 | /software/cityjson-compress/c++11/build 3 | /software/cityjson2obj/c++11/build 4 | *.pyc 5 | /docs/_build 6 | /software/cityjson-validator/c++11/build 7 | /software/cityjson-valschema/c++11/build 8 | .DS_Store 9 | /software/cityjson-info/c++11/cityjson-info 10 | cmake_install.cmake 11 | CMakeCache.txt 12 | CMakeFiles 13 | Makefile 14 | libthirdparty.a 15 | /software/cjvalschema/c++11/build 16 | /software/cjinfo/c++11/build 17 | /software/cjcompress/c++11/build 18 | /software/cityjson2citygml/c++11/build 19 | /software/cjcompress/c++11/buildx 20 | /extensions/metadata.json 21 | /extensions/geomtemplates.json 22 | /extensions/geomprimitives.json 23 | /extensions/cityobjects.json 24 | /extensions/cityjson.json 25 | /extensions/appearance.json 26 | /example-datasets/misc/out.obj 27 | /example-datasets/dummy-values/out.obj 28 | /example-datasets/dummy-values/out.json 29 | /specs/specs.html 30 | # local temporary files, notes etc. 31 | /tmp/ 32 | -------------------------------------------------------------------------------- /CITATION.bib: -------------------------------------------------------------------------------- 1 | 2 | @article{Ledoux19, 3 | author = {Hugo Ledoux and Ken Arroyo Ohori and Kavisha Kumar and Bal{\'{a}}zs Dukai and Anna Labetski and Stelios Vitalis}, 4 | doi = {http://dx.doi.org/10.1186/s40965-019-0064-0}, 5 | journal = {Open Geospatial Data, Software and Standards}, 6 | number = {4}, 7 | title = {{CityJSON}: a compact and easy-to-use encoding of the {CityGML} data model}, 8 | volume = {4}, 9 | year = {2019} 10 | } 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # CityJSON 3 | 4 | [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/cityjson/specs?label=version&style=for-the-badge)](https://github.com/cityjson/specs/releases/latest/) [![GitHub license](https://img.shields.io/github/license/cityjson/specs?style=for-the-badge)](https://github.com/cityjson/specs/blob/main/LICENSE) 5 | 6 | 7 | This repository is where the specifications and the schemas of CityJSON are kept. 8 | All previous versions are kept in tags in the commits. 9 | 10 | For all the details, see the official CityJSON website: [https://cityjson.org](https://cityjson.org). 11 | 12 | 13 | ## What is CityJSON? 14 | 15 | CityJSON is a [JSON-based](http://json.org) encoding for a subset of the [OGC CityGML](http://www.opengeospatial.org/standards/citygml) data model (version 3.0.0), which is an open standardised data model and exchange format (in [GML](http://www.opengeospatial.org/standards/gml)) to store digital 3D models of cities and landscapes. 16 | 17 | The aim of CityJSON is to offer an alternative to the GML encoding of CityGML, which can be verbose and complex (and thus rather frustrating to work with). 18 | CityJSON aims at being easy-to-use, both for reading datasets, and for creating them. 19 | It was designed with programmers in mind, so that tools and APIs supporting it can be quickly built, and [several software](https://www.cityjson.org/software/) have been created already. 20 | 21 | 22 | ## Contributing to the project 23 | 24 | We invite anyone to contribute to the development and improvement of CityJSON, all discussions, issues, and developments are open to everyone. 25 | 26 | 27 | ## If you use CityJSON in an academic context, please cite this article 28 | 29 | Ledoux H, Arroyo Ohori K, Kumar K, Dukai B, Labetski A, Vitalis S (2019). CityJSON: A compact and easy-to-use encoding of the CityGML data model. **Open Geospatial Data, Software and Standards**, 4:4 [(DOI)](http://dx.doi.org/10.1186/s40965-019-0064-0) [(PDF)](https://opengeospatialdata.springeropen.com/counter/pdf/10.1186/s40965-019-0064-0.pdf) 30 | 31 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Changelog 4 | 5 | All notable changes to this project will be documented in this file. 6 | 7 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 8 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 9 | 10 | 11 | ## [2.0.1] - 2024-04-11 12 | ### Changed 13 | - "metadata" allows additional non-listed properties (than the 6 by ISO). For more structured metadata it is advised to make use of the metadata-extended Extension 14 | - the schemas now enforce "type" for Semantic Surface 15 | - schemas now verify that "boundaries" having an empty list is an error 16 | - the "lod" for geometries are now restrained to those of CityGML and the extended-LoD by TUDelft (as the specifications already mentioned, but the schemas allowed anything X.Y) 17 | - fix 3 typos in the specifications 18 | 19 | 20 | ## [2.0.0] - 2023-09-27 21 | - this version is basically v1.1 with small fixes (see below) and an improved/clearer text 22 | - the major version change to 2.0 was required by the OGC to be officially approved 23 | ### Changed 24 | - `GenericCityObject` is back as a City Object in the data model, because it makes life easy for everyone and it is there in the v3.0 data model (albeit those are specific to the [SPACES](https://docs.ogc.org/is/20-010/20-010.html#toc24), which are not implemented in CityJSON) 25 | - it is now possible to define extra Semantic Surfaces in Extensions (with `"extraSemanticSurfaces"`), which is a mandatory property of the schema 26 | - `"metadata/pointOfContact"` is now a JSON object, like other addresses for Buildings/Bridges 27 | - the text of the specs has been improved and harmonised (there were some inconsistencies, for instance with addresses for City Objects and metadata) 28 | - the values of *u* and *v* for textures are allowed to be outside [0.0, 1.0] to allow repeated patterns. 29 | 30 | 31 | ## [1.1.3] - 2022-11-25 32 | ### Changed 33 | - CityJSONFeatures now do not have to dereference the GeometryTemplates, those can be in the "1st line"/metadata. Dereferencing is still allowed. cjio passes the GeometryTemplates in the 1st-line now. 34 | - `CityJSONFeature`: now clear that all children (recursively) of a feature should be bundled with its parent. 35 | - improved the text of the specifications at several places, and fixed sentences that were not precise enough. 36 | - change the `"uri"` to `"url"` for the Extensions, and now the schemas can have either of these. Going forward `"url"` is the preferred way. 37 | - restructured the text for the Extensions, now a 4th use-case is added: "Defining a new Semantic Object". It was always there but not listed as a case. Now fixed. 38 | ### Added 39 | - `"BuildingConstructiveElement"` was missing from the schemas as a CO, now added. 40 | - added 2 suggested conventions in the specs: file extensions `.city.json` and `.city.jsonl` 41 | 42 | 43 | ## [1.1.2] - 2022-08-16 44 | Minor changes to the schemas for errors, improved the text of the specs so that it's easier for everyone to read and understand. 45 | ### Changed 46 | - fixed the typo in the schema: `"TunnelFurniture"` 47 | - added the missing CityGML v3 types in the schemas: `"BridgeFurniture"` and `"Waterway"` and `"BuildingConstructiveElement"` 48 | - added a link in the specs text to the official CityGML v3 specs for definitions of each of the City Objects 49 | - improved and added a few sentences in the specs to make them clearer 50 | 51 | 52 | ## [1.1.1] - 2022-02-02 53 | Minor changes to the schemas for omissions/errors, harmonised the specs text slightly. 54 | ### Removed 55 | - `trafficDirection` attribute has been removed (https://github.com/cityjson/specs/issues/107) 56 | ### Changed 57 | - added Semantic types for interior surfaces: "FloorSurface", "InteriorWallSurface", and "CeilingSurface". 58 | - the restrictions for the geometry types for different City Objects are harmonised 59 | - MultiPoint and MultiLineString can have semantics (it was in the text but not in the schema) 60 | - added "address" property for BuildingUnit in the schema (was already described in the text) 61 | - the property "children_roles" of "CityObjectGroup" can have NULL values if not used 62 | - the specs text now is correct for the appearance: `"vertices-texture"` and not `"vertex-texture"` 63 | 64 | ## [1.1.0] - 2021-12-01 65 | ### Added 66 | - add support for CityGML v3.0.0: 67 | - add interior of Buildings/Tunnels/Bridges classes, eg `BuildingStorey`, `BuildingUnit`, `BuildingRoom`, `BridgeRoom` 68 | - add `OtherConstruction` 69 | - updated Transportation classes to be compliant 70 | - `CityJSONFeature` is defined, which can be used for streaming and handling large files 71 | ### Removed 72 | - `GenericCityObject` has been removed, Extensions should be used instead 73 | ### Changed 74 | - change the property `"lod"` of geometries from number to string 75 | - core metadata is smaller, extended/advanced metadata are now in the MetadataExtended Extension: https://github.com/cityjson/metadata-extended 76 | - CityJSON files are always compressed, that is their vertices are integers and the `"transform"` property is mandatory 77 | - City Objects do not have to have a `"geometry"` property anymore 78 | - `CityObjectGroup` has the role added as a property, to define what the role of each object in the group is 79 | - CRS now use the OGC Name Type Specification (https://docs.opengeospatial.org/pol/09-048r5.html) 80 | 81 | 82 | ## [1.0.3] - 2021-07-06 83 | ### Changed 84 | - fixed bugs in metadata.schema.json that made files with Extensions not having valid "metadata" (if certain properties were used) 85 | - (specification text stays exactly the same) 86 | 87 | 88 | ## [1.0.2] - 2021-04-21 89 | ### Changed 90 | - small improvements in the specs document to make concepts clearer 91 | - schemas are the same, with some simplifications to make their maintenance easier in the future 92 | 93 | 94 | ## [1.0.1] - 2019-07-09 95 | ### Changed 96 | - schemas go to json-schema version draft-07; will not change much in practice 97 | - a "minified" schema is now available, easier to validate with external tools 98 | - small improvements in the specs document: figure for City Objects, clarifications for parent-children, TINRelief can be any CompositeSurface 99 | 100 | 101 | ## [1.0.0] - 2019-04-26 102 | ### Changed 103 | - [Semantic versioning](https://semver.org/) is from on now used, with MAJOR.MINOR.PATCH 104 | - The `"extensions"` property now documents the version of the Extension that is used for this file; since an Extension will most likely be updated it should be possible to link to a specific version (X.Y) 105 | - new logo! 106 | 107 | 108 | ## [0.9] - 2019-01-28 109 | ### Changed 110 | - the `"parent"` property of City Objects is now named `"parents": []`, and is an array. This is to allow new City Objects in Extensions to have more than one parent; for the core objects this doesn't change anything (except that the property must be renamed and put an array; cjio `upgrade_version()` takes care of this) 111 | - the schemas have been revamped. The content is the same, but there are now abstract objects and city objects reuse these. It's thus way easier to modify and update and understand the schemas 112 | - the Extensions are not schemas files anymore, but JSON files with a specific syntax. The idea is the same, but now creating Extensions is simpler. 113 | - Extensions now allow new attributes for already existing City Objects, ie it's possible to add an attribute "+myattribute" to a "Building" and document it in a schema. Before it was only possible if one created a new specific City Object. 114 | - Extensions now allow root properties to be added and documented. 115 | - Transportation module now has LoD0 with MultiLineString geometries. 116 | 117 | 118 | ## [0.8] - 2018-09-24 119 | ### Added 120 | - Extensions, aka ADEs in the CityGML world, are now supported. The page 'Extensions' explains how to create one (its schema), how to validate your data, etc. 121 | 122 | ### Changed 123 | - introduction of a concept that was implicit but never mentioned: City Objects can be either of type '1st-level' or '2nd-level' (a Building would be 1st-level, and a BuildingPart 2nd-level). This concept is now for all City Object, including those that are defined in an Extension. This means that the properties "Parts" and "Installations" dissapear from the schema of Building/Bridge/Tunnel, and are replaced by a single one: "children". Also, a child (2nd-level City Object) needs to have a link to its parent City Object (with "parent"). 124 | - metadata/crs and metadata/bbox have been replaced by metadata/geographicReference and metadata/geographicExtent. Longer to type (file sizes will increase!), but ISO19115-compliant. Also, bbox->geographicExtent for each of the City Object too. cjio's upgrade\_version() takes care of all these automatically. 125 | - metadata has more possibilities, it's been extended to 3D city models needs. Some fields from the previous metadata properties were modified, be aware. 126 | - Observe that the software cjio () offers an option `--upgrade\_version` (from v0.6 --> v0.8) that takes care of the changes above (except the metadata, you'll need to adjust manually, sorry I am not coding all this). Simply run a v0.6 file and it's upgraded. 127 | 128 | 129 | ## [0.6] - 2018-04-11 130 | ### Added 131 | - support for Geometry Templates (aka Implicit Geometries) 132 | - support for City Object Groups 133 | - any members at the root of CityJSON are now allowed (but might be ignored by parser) 134 | - each City Object can have a "bbox" member 135 | 136 | ### Changed 137 | - the schema is now split into different schemas that are linked together 138 | - the schema validator (software cjvalschema) is now in Python and improved, thus everyone can run it easily 139 | - cjcompress does a better job and bugs have been removed 140 | - textures are not forced to be in the folder 'appearances' anymore, any link to an image will do (useful for WFS for instance). 141 | 142 | 143 | ## [0.5] - 2017-11-14 144 | ### Added 145 | - handling of `null` values at any level in a nested arrays is now supported in the schema 146 | - CityGML module 'Transportation' added 147 | - CityGML module 'Bridge' added, thus the 4 classes: Bridge, BridgePart, BridgeInstallation, and BridgeConstructionElement 148 | - CityGML module 'Tunnel' added, thus the 4 classes: Tunnel, TunnelPart, and TunnelInstallation 149 | 150 | ## Changed 151 | - the way semantics is stored for the surface is completely changed and breaks previous version 152 | - material now can be per surface `"values": []` or `"value": 2` 153 | 154 | 155 | ## [0.3] - 2017-10-12 156 | ### Added 157 | - utility cityjson-valschema now ensures that no two City Objects have the same ID/key 158 | - the schema now has depths of Geometry Objects for "texture", "material", and "semantics" arrays. 159 | - the schema and the validator are generally better 160 | - clear use of null and empty {} where appropriate 161 | 162 | ### Changed 163 | - change to "header" and versioning of the file 164 | - 1 textures and materials per geometry 165 | 166 | 167 | ## [0.2] - 2017-09-05 168 | ### Added 169 | - Semantics Objects, so that Semantic Surfaces have specific attributes 170 | - software to validate the schema + other properties impossible represent with the schema, eg warning users of "soft" errors like attributes not in CityGML 171 | 172 | ### Changed 173 | - metadata now ISO19115 compliant 💥 174 | - materials now use X3D mechanism, same as CityGML 175 | - textures now use COLLADA mechanism, same as CityGML 176 | - improved greatly the schema (more is validated) 177 | 178 | 179 | ## [0.1] - 2017-08-01 180 | ### Added 181 | - first beta release of CityJSON 182 | 183 | 184 | [2.0.1]: https://github.com/tudelft3d/cityjson/compare/2.0.0...2.0.1 185 | [2.0.0]: https://github.com/tudelft3d/cityjson/compare/1.1.3...2.0.0 186 | [1.1.3]: https://github.com/tudelft3d/cityjson/compare/1.1.2...1.1.3 187 | [1.1.2]: https://github.com/tudelft3d/cityjson/compare/1.1.1...1.1.2 188 | [1.1.1]: https://github.com/tudelft3d/cityjson/compare/1.1.0...1.1.1 189 | [1.1.0]: https://github.com/tudelft3d/cityjson/compare/1.0.3...1.1.0 190 | [1.0.3]: https://github.com/tudelft3d/cityjson/compare/1.0.2...1.0.3 191 | [1.0.2]: https://github.com/tudelft3d/cityjson/compare/1.0.1...1.0.2 192 | [1.0.0]: https://github.com/tudelft3d/cityjson/compare/0.9...1.0.0 193 | [0.9]: https://github.com/tudelft3d/cityjson/compare/0.8...0.9 194 | [0.8]: https://github.com/tudelft3d/cityjson/compare/0.6...0.8 195 | [0.6]: https://github.com/tudelft3d/cityjson/compare/0.5...0.6 196 | [0.5]: https://github.com/tudelft3d/cityjson/compare/0.3...0.5 197 | [0.3]: https://github.com/tudelft3d/cityjson/compare/0.2...0.3 198 | [0.2]: https://github.com/tudelft3d/cityjson/compare/0.1...0.2 199 | [0.1]: https://github.com/tudelft3d/cityjson/releases/0.1 200 | -------------------------------------------------------------------------------- /extensions/11/extension.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "title": "CityJSON Extension specifications v1.1", 4 | "type": "object", 5 | 6 | "definitions": { 7 | 8 | "Plus": { 9 | "patternProperties": { 10 | "(\\+)\\w+": {} 11 | }, 12 | "additionalProperties": false 13 | } 14 | 15 | }, 16 | 17 | 18 | "properties": { 19 | "type": { "enum": ["CityJSONExtension"] }, 20 | "name": { 21 | "type": "string", 22 | "pattern": "^\\w[a-zA-Z@#0-9._]*$", 23 | "description": "no spaces allowed" 24 | }, 25 | 26 | "version": { 27 | "type": "string", 28 | "pattern": "^(\\d\\.)(\\d+\\.)?(\\*|\\d+)$" 29 | }, 30 | 31 | "versionCityJSON": { 32 | "type": "string", 33 | "pattern": "^(\\d\\.)(\\d)$" 34 | }, 35 | 36 | "url": { 37 | "type": "string", 38 | "format": "uri-reference", 39 | "description": "good to host the extension at a URL so that others can access it" 40 | }, 41 | 42 | "description": { "type": "string" }, 43 | 44 | "extraRootProperties":{ 45 | "patternProperties": { 46 | "(\\+|\\@)\\w+": {} 47 | }, 48 | "additionalProperties": false 49 | }, 50 | 51 | "extraAttributes": { 52 | "type": "object", 53 | "properties": { 54 | "Bridge": { "$ref": "#/definitions/Plus" }, 55 | "BridgeConstructiveElement": { "$ref": "#/definitions/Plus" }, 56 | "BridgeFurniture": { "$ref": "#/definitions/Plus" }, 57 | "BridgeInstallation": { "$ref": "#/definitions/Plus" }, 58 | "BridgePart": { "$ref": "#/definitions/Plus" }, 59 | "BridgeRoom": { "$ref": "#/definitions/Plus" }, 60 | "Building": { "$ref": "#/definitions/Plus" }, 61 | "BuildingPart": { "$ref": "#/definitions/Plus" }, 62 | "BuildingConstructiveElement": { "$ref": "#/definitions/Plus" }, 63 | "BuildingFurniture": { "$ref": "#/definitions/Plus" }, 64 | "BuildingInstallation": { "$ref": "#/definitions/Plus" }, 65 | "BuildingRoom": { "$ref": "#/definitions/Plus" }, 66 | "BuildingStorey": { "$ref": "#/definitions/Plus" }, 67 | "BuildingUnit": { "$ref": "#/definitions/Plus" }, 68 | "CityFurniture": { "$ref": "#/definitions/Plus" }, 69 | "CityObjectGroup": { "$ref": "#/definitions/Plus" }, 70 | "LandUse": { "$ref": "#/definitions/Plus" }, 71 | "OtherConstruction": { "$ref": "#/definitions/Plus" }, 72 | "PlantCover": { "$ref": "#/definitions/Plus" }, 73 | "Railway": { "$ref": "#/definitions/Plus" }, 74 | "Road": { "$ref": "#/definitions/Plus" }, 75 | "SolitaryVegetationObject": { "$ref": "#/definitions/Plus" }, 76 | "TINRelief": { "$ref": "#/definitions/Plus" }, 77 | "TransportSquare": { "$ref": "#/definitions/Plus" }, 78 | "Tunnel": { "$ref": "#/definitions/Plus" }, 79 | "TunnelConstructiveElement": { "$ref": "#/definitions/Plus" }, 80 | "TunnelFurniture": { "$ref": "#/definitions/Plus" }, 81 | "TunnelHollowSpace": { "$ref": "#/definitions/Plus" }, 82 | "TunnelInstallation": { "$ref": "#/definitions/Plus" }, 83 | "TunnelPart": { "$ref": "#/definitions/Plus" }, 84 | "WaterBody": { "$ref": "#/definitions/Plus" }, 85 | "Waterway": { "$ref": "#/definitions/Plus" } 86 | }, 87 | "additionalProperties": false 88 | }, 89 | 90 | "extraCityObjects": { 91 | "patternProperties": { 92 | "(\\+)([A-Z])\\w+": {} 93 | }, 94 | "additionalProperties": false 95 | } 96 | 97 | }, 98 | "anyOf": [ 99 | { 100 | "required": [ 101 | "url" 102 | ] 103 | }, 104 | { 105 | "required": [ 106 | "uri" 107 | ] 108 | } 109 | ], 110 | "required": ["type", "name", "version", "versionCityJSON", "extraAttributes", "extraCityObjects", "extraRootProperties"] 111 | } 112 | 113 | -------------------------------------------------------------------------------- /extensions/11/generic.ext.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "CityJSONExtension", 3 | "name": "Generic", 4 | "uri": "https://www.cityjson.org/extensions/download/generic.ext.json", 5 | "version": "1.0.1", 6 | "versionCityJSON": "1.1", 7 | "description": "Extension to handle GenericCityObject; meant as a template to learn how to construct an Extension", 8 | 9 | "extraRootProperties": {}, 10 | 11 | "extraAttributes": {}, 12 | 13 | "extraCityObjects": { 14 | "+GenericCityObject": { 15 | "allOf": [ 16 | { "$ref": "cityobjects.schema.json#/_AbstractCityObject" }, 17 | { 18 | "properties": { 19 | "type": { "enum": [ "+GenericCityObject" ] }, 20 | "attributes": { 21 | "type": "object", 22 | "properties": { 23 | "my-attribute": { "type": "string" } 24 | } 25 | }, 26 | "geometry": { 27 | "type": "array", 28 | "items": { 29 | "oneOf": [ 30 | { "$ref": "geomprimitives.schema.json#/MultiPoint" }, 31 | { "$ref": "geomprimitives.schema.json#/MultiLineString" }, 32 | { "$ref": "geomprimitives.schema.json#/MultiSurface" }, 33 | { "$ref": "geomprimitives.schema.json#/CompositeSurface" }, 34 | { "$ref": "geomprimitives.schema.json#/Solid" }, 35 | { "$ref": "geomprimitives.schema.json#/MultiSolid" }, 36 | { "$ref": "geomprimitives.schema.json#/CompositeSolid" }, 37 | { "$ref": "geomprimitives.schema.json#/GeometryInstance" } 38 | ] 39 | } 40 | } 41 | }, 42 | "required": [ "type" ] 43 | } 44 | ] 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /extensions/11/manycases.ext.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "CityJSONExtension", 3 | "name": "ManyCases", 4 | "uri": "http://someurl.org/manycases.ext.json", 5 | "version": "1.0.0", 6 | "versionCityJSON": "1.1", 7 | "description": "Extension to test the validator", 8 | 9 | "definitions": { 10 | "measure": { 11 | "type": "object", 12 | "properties": { 13 | "value": { "type": "number" }, 14 | "uom": { "type": "string" } 15 | }, 16 | "required": [ "value", "uom" ], 17 | "additionalProperties": false 18 | } 19 | }, 20 | 21 | "extraCityObjects": { 22 | "+GenericCityObject": { 23 | "allOf": [ 24 | { "$ref": "cityobjects.schema.json#/_AbstractCityObject" }, 25 | { 26 | "properties": { 27 | "type": { "enum": [ "+GenericCityObject" ] }, 28 | "attributes": { 29 | "type": "object", 30 | "properties": { 31 | "my-attribute": { "type": "string" }, 32 | "measured": { "$ref": "#/definitions/measure" } 33 | } 34 | }, 35 | "geometry": { 36 | "type": "array", 37 | "items": { 38 | "oneOf": [ 39 | { "$ref": "geomprimitives.schema.json#/Solid" }, 40 | { "$ref": "geomprimitives.schema.json#/MultiSurface" } 41 | ] 42 | } 43 | } 44 | }, 45 | "required": [ "type", "geometry" ] 46 | } 47 | ] 48 | } 49 | }, 50 | 51 | "extraRootProperties": { 52 | "+census": { 53 | "type": "object", 54 | "properties": { 55 | "percent_men": { 56 | "type": "number", 57 | "minimum": 0.0, 58 | "maximum": 100.0 59 | }, 60 | "percent_women": { 61 | "type": "number", 62 | "minimum": 0.0, 63 | "maximum": 100.0 64 | } 65 | } 66 | } 67 | }, 68 | 69 | "extraAttributes": { 70 | "Building": { 71 | "+colour": { 72 | "type": "object", 73 | "properties": { 74 | "rgba": { 75 | "type": "array", 76 | "items": {"type": "number"}, 77 | "minItems": 4, 78 | "maxItems": 4 79 | } 80 | }, 81 | "required": ["rgba"], 82 | "additionalProperties": false 83 | } 84 | } 85 | } 86 | 87 | } -------------------------------------------------------------------------------- /extensions/11/noise.ext.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "CityJSONExtension", 3 | "name": "Noise", 4 | "uri": "https://www.cityjson.org/tutorials/files/noise.ext.json", 5 | "version": "1.1.0", 6 | "versionCityJSON": "1.1", 7 | "description": "Extension for Noise Emission Simulation", 8 | 9 | "definitions": { 10 | "measure": { 11 | "type": "object", 12 | "properties": { 13 | "value": { "type": "number" }, 14 | "uom": { "type": "string" } 15 | }, 16 | "required": [ "value", "uom" ], 17 | "additionalProperties": false 18 | }, 19 | 20 | "train": { 21 | "type": "object", 22 | "properties": { 23 | "trainType": { "type": "string" }, 24 | "trainTypeCorrection": { "$ref": "#/definitions/measure" }, 25 | "brakePortionDay": { "$ref": "#/definitions/measure" }, 26 | "brakePortionEvening": { "$ref": "#/definitions/measure" }, 27 | "brakePortionNight": { "$ref": "#/definitions/measure" }, 28 | "lengthDay": { "$ref": "#/definitions/measure" }, 29 | "lengthEvening": { "$ref": "#/definitions/measure" }, 30 | "lengthNight": { "$ref": "#/definitions/measure" }, 31 | "speedDay": { "$ref": "#/definitions/measure" }, 32 | "speedEvening": { "$ref": "#/definitions/measure" }, 33 | "speedNight": { "$ref": "#/definitions/measure" }, 34 | "additionalCorrectionTrain": { "$ref": "#/definitions/measure" } 35 | }, 36 | "additionalProperties": false 37 | } 38 | }, 39 | 40 | "extraRootProperties": {}, 41 | 42 | "extraAttributes": { 43 | "Building": { 44 | "+noise-buildingReflection": { "type": "string" }, 45 | "+noise-buildingReflectionCorrection": { "$ref": "#/definitions/measure" }, 46 | "+noise-buildingLDenMax": { "$ref": "#/definitions/measure" }, 47 | "+noise-buildingLDenMin": { "$ref": "#/definitions/measure" }, 48 | "+noise-buildingLDenEq": { "$ref": "#/definitions/measure" }, 49 | "+noise-buildingLNightMax": { "$ref": "#/definitions/measure" }, 50 | "+noise-buildingLNightMin": { "$ref": "#/definitions/measure" }, 51 | "+noise-buildingLNightEq": { "$ref": "#/definitions/measure" }, 52 | "+noise-buildingHabitants": { "type": "integer" }, 53 | "+noise-buildingAppartments": { "type": "integer" }, 54 | "+noise-buildingImmissionPoints": { 55 | "type": "array", 56 | "items": { "type": "integer" } }, 57 | "+noise-remark": { "type": "string" } 58 | }, 59 | "BuildingPart": { 60 | "+noise-buildingReflection": { "type": "string" }, 61 | "+noise-buildingReflectionCorrection": { "$ref": "#/definitions/measure" }, 62 | "+noise-buildingLDenMax": { "$ref": "#/definitions/measure" }, 63 | "+noise-buildingLDenMin": { "$ref": "#/definitions/measure" }, 64 | "+noise-buildingLDenEq": { "$ref": "#/definitions/measure" }, 65 | "+noise-buildingLNightMax": { "$ref": "#/definitions/measure" }, 66 | "+noise-buildingLNightMin": { "$ref": "#/definitions/measure" }, 67 | "+noise-buildingLNightEq": { "$ref": "#/definitions/measure" }, 68 | "+noise-buildingHabitants": { "type": "integer" }, 69 | "+noise-buildingAppartments": { "type": "integer" }, 70 | "+noise-buildingImmissionPoints": { 71 | "type": "array", 72 | "items": { "type": "integer" } }, 73 | "+noise-remark": { "type": "string" } 74 | } 75 | }, 76 | 77 | "extraCityObjects": { 78 | "+NoiseCityFurnitureSegment": { 79 | "allOf": [ 80 | { "$ref": "cityobjects.schema.json#/_AbstractCityObject" }, 81 | { 82 | "properties": { 83 | "type": { "enum": [ "+NoiseCityFurnitureSegment" ] }, 84 | "attributes": { 85 | "type": "object", 86 | "properties": { 87 | "reflection": { "type": "string" }, 88 | "reflectionCorrection": { "$ref": "#/definitions/measure" }, 89 | "height": { "$ref": "#/definitions/measure" }, 90 | "distance": { "$ref": "#/definitions/measure" } 91 | } 92 | }, 93 | "parents": { 94 | "type": "array", 95 | "items": {"type": "string"} 96 | }, 97 | "geometry": { 98 | "type": "array", 99 | "items": { 100 | "oneOf": [ 101 | { "$ref": "geomprimitives.schema.json#/MultiLineString" } 102 | ] 103 | } 104 | } 105 | }, 106 | "required": [ "type", "parents", "geometry" ] 107 | } 108 | ] 109 | }, 110 | 111 | "+NoiseRoadSegment": { 112 | "allOf": [ 113 | { "$ref": "cityobjects.schema.json#/_AbstractCityObject" }, 114 | { 115 | "properties": { 116 | "type": { "enum": [ "+NoiseRoadSegment" ] }, 117 | "attributes": { 118 | "type": "object", 119 | "properties": { 120 | "mDay": { "$ref": "#/definitions/measure" }, 121 | "mEvening": { "$ref": "#/definitions/measure" }, 122 | "mNight": { "$ref": "#/definitions/measure" }, 123 | "mDay16": { "$ref": "#/definitions/measure" }, 124 | "pDay": { "$ref": "#/definitions/measure" }, 125 | "pEvening": { "$ref": "#/definitions/measure" }, 126 | "pNight": { "$ref": "#/definitions/measure" }, 127 | "pDay16": { "$ref": "#/definitions/measure" }, 128 | "dtv": { "$ref": "#/definitions/measure" }, 129 | "speedDayPkw": { "$ref": "#/definitions/measure" }, 130 | "speedEveningPkw": { "$ref": "#/definitions/measure" }, 131 | "speedNightPkw": { "$ref": "#/definitions/measure" }, 132 | "speedDayLkw": { "$ref": "#/definitions/measure" }, 133 | "speedEveningLkw": { "$ref": "#/definitions/measure" }, 134 | "speedNightLkw": { "$ref": "#/definitions/measure" }, 135 | "roadSurfaceMaterial": { "type": "string" }, 136 | "roadSurfaceCorrection": { "$ref": "#/definitions/measure" }, 137 | "distanceCarriageway": { "$ref": "#/definitions/measure" }, 138 | "distanceD": { "$ref": "#/definitions/measure" }, 139 | "bridge": { "type": "boolean" }, 140 | "tunnel": { "type": "boolean" }, 141 | "roadGradientPercent": { "$ref": "#/definitions/measure" }, 142 | "lineage": { "type": "string" } 143 | } 144 | }, 145 | "parents": { 146 | "type": "array", 147 | "items": {"type": "string"} 148 | }, 149 | "geometry": { 150 | "type": "array", 151 | "items": { 152 | "oneOf": [ 153 | { "$ref": "geomprimitives.schema.json#/MultiLineString" } 154 | ] 155 | } 156 | } 157 | }, 158 | "required": [ "type", "parents", "geometry" ] 159 | } 160 | ] 161 | }, 162 | 163 | "+NoiseRailwaySegment": { 164 | "allOf": [ 165 | { "$ref": "cityobjects.schema.json#/_AbstractCityObject" }, 166 | { 167 | "properties": { 168 | "type": { "enum": [ "+NoiseRailwaySegment" ] }, 169 | "attributes": { 170 | "type": "object", 171 | "properties": { 172 | "railwaySurfaceMaterial": { "type": "string" }, 173 | "railwaySurfaceCorrection": { "$ref": "#/definitions/measure" }, 174 | "bridge": { "type": "boolean" }, 175 | "crossing": { "type": "boolean" }, 176 | "curveRadius": { "$ref": "#/definitions/measure" }, 177 | "additionalCorrectionSegment": { "$ref": "#/definitions/measure" } 178 | } 179 | }, 180 | "usedBy": { 181 | "type": "array", 182 | "items": { "$ref": "#/definitions/train" } 183 | }, 184 | "parents": { 185 | "type": "array", 186 | "items": {"type": "string"} 187 | }, 188 | "geometry": { 189 | "type": "array", 190 | "items": { 191 | "oneOf": [ 192 | { "$ref": "geomprimitives.schema.json#/MultiLineString" } 193 | ] 194 | } 195 | } 196 | }, 197 | "required": [ "type", "parents", "geometry" ] 198 | } 199 | ] 200 | } 201 | } 202 | 203 | } -------------------------------------------------------------------------------- /extensions/11/potato.ext.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "CityJSONExtension", 3 | "name": "Potato", 4 | "uri": "https://www.cityjson.org/potato.ext.json", 5 | "version": "1.1.0", 6 | "versionCityJSON": "1.1", 7 | "description": "Extension for Potatoes", 8 | 9 | "definitions": { 10 | "measure": { 11 | "type": "object", 12 | "properties": { 13 | "value": { "type": "number" }, 14 | "uom": { "type": "string" } 15 | }, 16 | "required": [ "value", "uom" ], 17 | "additionalProperties": false 18 | }, 19 | 20 | "train": { 21 | "type": "object", 22 | "properties": { 23 | "trainType": { "type": "string" }, 24 | "trainTypeCorrection": { "$ref": "#/definitions/measure" }, 25 | "brakePortionDay": { "$ref": "#/definitions/measure" }, 26 | "brakePortionEvening": { "$ref": "#/definitions/measure" }, 27 | "brakePortionNight": { "$ref": "#/definitions/measure" }, 28 | "lengthDay": { "$ref": "#/definitions/measure" }, 29 | "lengthEvening": { "$ref": "#/definitions/measure" }, 30 | "lengthNight": { "$ref": "#/definitions/measure" }, 31 | "speedDay": { "$ref": "#/definitions/measure" }, 32 | "speedEvening": { "$ref": "#/definitions/measure" }, 33 | "speedNight": { "$ref": "#/definitions/measure" }, 34 | "additionalCorrectionTrain": { "$ref": "#/definitions/measure" } 35 | }, 36 | "additionalProperties": false 37 | } 38 | }, 39 | 40 | "extraRootProperties": {}, 41 | "extraAttributes": {}, 42 | 43 | "extraCityObjects": { 44 | "_AbstractPotato": { 45 | "properties": { 46 | "attributes": { 47 | "type": "object" 48 | }, 49 | "colours": { 50 | "type": "array", 51 | "items": { 52 | "type": "string" 53 | } 54 | } 55 | } 56 | }, 57 | 58 | "+Potato": { 59 | "allOf": [ 60 | { "$ref": "#/extraCityObjects/_AbstractPotato" }, 61 | { 62 | "properties": { 63 | "type": { "enum": [ "+Potato" ] }, 64 | "attributes": { 65 | "type": "object", 66 | "properties": { 67 | "reflection": { "type": "string" }, 68 | "reflectionCorrection": { "$ref": "#/definitions/measure" }, 69 | "height": { "$ref": "#/definitions/measure" }, 70 | "distance": { "$ref": "#/definitions/measure" } 71 | } 72 | }, 73 | "geometry": { 74 | "type": "array", 75 | "items": { 76 | "oneOf": [ 77 | { "$ref": "geomprimitives.schema.json#/Solid" } 78 | ] 79 | } 80 | } 81 | }, 82 | "required": [ "type", "geometry" ] 83 | } 84 | ] 85 | } 86 | 87 | } 88 | } -------------------------------------------------------------------------------- /extensions/20/extension.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "title": "CityJSON Extension specifications v2.0", 4 | "type": "object", 5 | 6 | "definitions": { 7 | 8 | "Plus": { 9 | "patternProperties": { 10 | "(\\+)\\w+": {} 11 | }, 12 | "additionalProperties": false 13 | } 14 | 15 | }, 16 | 17 | 18 | "properties": { 19 | "type": { "enum": ["CityJSONExtension"] }, 20 | "name": { 21 | "type": "string", 22 | "pattern": "^\\w[a-zA-Z@#0-9._]*$", 23 | "description": "no spaces allowed" 24 | }, 25 | 26 | "version": { 27 | "type": "string", 28 | "pattern": "^(\\d\\.)(\\d+\\.)?(\\*|\\d+)$" 29 | }, 30 | 31 | "versionCityJSON": { 32 | "type": "string", 33 | "pattern": "^(\\d\\.)(\\d)$" 34 | }, 35 | 36 | "url": { 37 | "type": "string", 38 | "format": "uri-reference", 39 | "description": "good to host the extension at a URL so that others can access it" 40 | }, 41 | 42 | "description": { "type": "string" }, 43 | 44 | "extraRootProperties":{ 45 | "patternProperties": { 46 | "(\\+|\\@)\\w+": {} 47 | }, 48 | "additionalProperties": false 49 | }, 50 | 51 | "extraAttributes": { 52 | "type": "object", 53 | "properties": { 54 | "Bridge": { "$ref": "#/definitions/Plus" }, 55 | "BridgeConstructiveElement": { "$ref": "#/definitions/Plus" }, 56 | "BridgeFurniture": { "$ref": "#/definitions/Plus" }, 57 | "BridgeInstallation": { "$ref": "#/definitions/Plus" }, 58 | "BridgePart": { "$ref": "#/definitions/Plus" }, 59 | "BridgeRoom": { "$ref": "#/definitions/Plus" }, 60 | "Building": { "$ref": "#/definitions/Plus" }, 61 | "BuildingPart": { "$ref": "#/definitions/Plus" }, 62 | "BuildingConstructiveElement": { "$ref": "#/definitions/Plus" }, 63 | "BuildingFurniture": { "$ref": "#/definitions/Plus" }, 64 | "BuildingInstallation": { "$ref": "#/definitions/Plus" }, 65 | "BuildingRoom": { "$ref": "#/definitions/Plus" }, 66 | "BuildingStorey": { "$ref": "#/definitions/Plus" }, 67 | "BuildingUnit": { "$ref": "#/definitions/Plus" }, 68 | "CityFurniture": { "$ref": "#/definitions/Plus" }, 69 | "CityObjectGroup": { "$ref": "#/definitions/Plus" }, 70 | "GenericCityObject": { "$ref": "#/definitions/Plus" }, 71 | "LandUse": { "$ref": "#/definitions/Plus" }, 72 | "OtherConstruction": { "$ref": "#/definitions/Plus" }, 73 | "PlantCover": { "$ref": "#/definitions/Plus" }, 74 | "Railway": { "$ref": "#/definitions/Plus" }, 75 | "Road": { "$ref": "#/definitions/Plus" }, 76 | "SolitaryVegetationObject": { "$ref": "#/definitions/Plus" }, 77 | "TINRelief": { "$ref": "#/definitions/Plus" }, 78 | "TransportSquare": { "$ref": "#/definitions/Plus" }, 79 | "Tunnel": { "$ref": "#/definitions/Plus" }, 80 | "TunnelConstructiveElement": { "$ref": "#/definitions/Plus" }, 81 | "TunnelFurniture": { "$ref": "#/definitions/Plus" }, 82 | "TunnelHollowSpace": { "$ref": "#/definitions/Plus" }, 83 | "TunnelInstallation": { "$ref": "#/definitions/Plus" }, 84 | "TunnelPart": { "$ref": "#/definitions/Plus" }, 85 | "WaterBody": { "$ref": "#/definitions/Plus" }, 86 | "Waterway": { "$ref": "#/definitions/Plus" } 87 | }, 88 | "additionalProperties": false 89 | }, 90 | 91 | "extraCityObjects": { 92 | "patternProperties": { 93 | "(\\+)([A-Z])\\w+": {} 94 | }, 95 | "additionalProperties": false 96 | }, 97 | 98 | "extraSemanticSurfaces": { 99 | "patternProperties": { 100 | "(\\+)([A-Z])\\w+": {} 101 | }, 102 | "additionalProperties": false 103 | } 104 | 105 | }, 106 | "anyOf": [ 107 | { 108 | "required": [ 109 | "url" 110 | ] 111 | }, 112 | { 113 | "required": [ 114 | "uri" 115 | ] 116 | } 117 | ], 118 | "required": ["type", "name", "version", "versionCityJSON", "extraAttributes", "extraCityObjects", "extraRootProperties", "extraSemanticSurfaces"] 119 | } 120 | 121 | -------------------------------------------------------------------------------- /extensions/20/noise.ext.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "CityJSONExtension", 3 | "name": "Noise", 4 | "uri": "https://www.cityjson.org/tutorials/files/noise.ext.json", 5 | "version": "2.0", 6 | "versionCityJSON": "2.0", 7 | "description": "Extension for Noise Emission Simulation", 8 | 9 | "definitions": { 10 | "measure": { 11 | "type": "object", 12 | "properties": { 13 | "value": { "type": "number" }, 14 | "uom": { "type": "string" } 15 | }, 16 | "required": [ "value", "uom" ], 17 | "additionalProperties": false 18 | }, 19 | 20 | "train": { 21 | "type": "object", 22 | "properties": { 23 | "trainType": { "type": "string" }, 24 | "trainTypeCorrection": { "$ref": "#/definitions/measure" }, 25 | "brakePortionDay": { "$ref": "#/definitions/measure" }, 26 | "brakePortionEvening": { "$ref": "#/definitions/measure" }, 27 | "brakePortionNight": { "$ref": "#/definitions/measure" }, 28 | "lengthDay": { "$ref": "#/definitions/measure" }, 29 | "lengthEvening": { "$ref": "#/definitions/measure" }, 30 | "lengthNight": { "$ref": "#/definitions/measure" }, 31 | "speedDay": { "$ref": "#/definitions/measure" }, 32 | "speedEvening": { "$ref": "#/definitions/measure" }, 33 | "speedNight": { "$ref": "#/definitions/measure" }, 34 | "additionalCorrectionTrain": { "$ref": "#/definitions/measure" } 35 | }, 36 | "additionalProperties": false 37 | } 38 | }, 39 | 40 | "extraRootProperties": {}, 41 | "extraSemanticSurfaces": {}, 42 | 43 | "extraAttributes": { 44 | "Building": { 45 | "+noise-buildingReflection": { "type": "string" }, 46 | "+noise-buildingReflectionCorrection": { "$ref": "#/definitions/measure" }, 47 | "+noise-buildingLDenMax": { "$ref": "#/definitions/measure" }, 48 | "+noise-buildingLDenMin": { "$ref": "#/definitions/measure" }, 49 | "+noise-buildingLDenEq": { "$ref": "#/definitions/measure" }, 50 | "+noise-buildingLNightMax": { "$ref": "#/definitions/measure" }, 51 | "+noise-buildingLNightMin": { "$ref": "#/definitions/measure" }, 52 | "+noise-buildingLNightEq": { "$ref": "#/definitions/measure" }, 53 | "+noise-buildingHabitants": { "type": "integer" }, 54 | "+noise-buildingAppartments": { "type": "integer" }, 55 | "+noise-buildingImmissionPoints": { 56 | "type": "array", 57 | "items": { "type": "integer" } }, 58 | "+noise-remark": { "type": "string" } 59 | }, 60 | "BuildingPart": { 61 | "+noise-buildingReflection": { "type": "string" }, 62 | "+noise-buildingReflectionCorrection": { "$ref": "#/definitions/measure" }, 63 | "+noise-buildingLDenMax": { "$ref": "#/definitions/measure" }, 64 | "+noise-buildingLDenMin": { "$ref": "#/definitions/measure" }, 65 | "+noise-buildingLDenEq": { "$ref": "#/definitions/measure" }, 66 | "+noise-buildingLNightMax": { "$ref": "#/definitions/measure" }, 67 | "+noise-buildingLNightMin": { "$ref": "#/definitions/measure" }, 68 | "+noise-buildingLNightEq": { "$ref": "#/definitions/measure" }, 69 | "+noise-buildingHabitants": { "type": "integer" }, 70 | "+noise-buildingAppartments": { "type": "integer" }, 71 | "+noise-buildingImmissionPoints": { 72 | "type": "array", 73 | "items": { "type": "integer" } }, 74 | "+noise-remark": { "type": "string" } 75 | } 76 | }, 77 | 78 | "extraCityObjects": { 79 | "+NoiseCityFurnitureSegment": { 80 | "allOf": [ 81 | { "$ref": "cityobjects.schema.json#/_AbstractCityObject" }, 82 | { 83 | "properties": { 84 | "type": { "enum": [ "+NoiseCityFurnitureSegment" ] }, 85 | "attributes": { 86 | "type": "object", 87 | "properties": { 88 | "reflection": { "type": "string" }, 89 | "reflectionCorrection": { "$ref": "#/definitions/measure" }, 90 | "height": { "$ref": "#/definitions/measure" }, 91 | "distance": { "$ref": "#/definitions/measure" } 92 | } 93 | }, 94 | "parents": { 95 | "type": "array", 96 | "items": {"type": "string"} 97 | }, 98 | "geometry": { 99 | "type": "array", 100 | "items": { 101 | "oneOf": [ 102 | { "$ref": "geomprimitives.schema.json#/MultiLineString" } 103 | ] 104 | } 105 | } 106 | }, 107 | "required": [ "type", "parents", "geometry" ] 108 | } 109 | ] 110 | }, 111 | 112 | "+NoiseRoadSegment": { 113 | "allOf": [ 114 | { "$ref": "cityobjects.schema.json#/_AbstractCityObject" }, 115 | { 116 | "properties": { 117 | "type": { "enum": [ "+NoiseRoadSegment" ] }, 118 | "attributes": { 119 | "type": "object", 120 | "properties": { 121 | "mDay": { "$ref": "#/definitions/measure" }, 122 | "mEvening": { "$ref": "#/definitions/measure" }, 123 | "mNight": { "$ref": "#/definitions/measure" }, 124 | "mDay16": { "$ref": "#/definitions/measure" }, 125 | "pDay": { "$ref": "#/definitions/measure" }, 126 | "pEvening": { "$ref": "#/definitions/measure" }, 127 | "pNight": { "$ref": "#/definitions/measure" }, 128 | "pDay16": { "$ref": "#/definitions/measure" }, 129 | "dtv": { "$ref": "#/definitions/measure" }, 130 | "speedDayPkw": { "$ref": "#/definitions/measure" }, 131 | "speedEveningPkw": { "$ref": "#/definitions/measure" }, 132 | "speedNightPkw": { "$ref": "#/definitions/measure" }, 133 | "speedDayLkw": { "$ref": "#/definitions/measure" }, 134 | "speedEveningLkw": { "$ref": "#/definitions/measure" }, 135 | "speedNightLkw": { "$ref": "#/definitions/measure" }, 136 | "roadSurfaceMaterial": { "type": "string" }, 137 | "roadSurfaceCorrection": { "$ref": "#/definitions/measure" }, 138 | "distanceCarriageway": { "$ref": "#/definitions/measure" }, 139 | "distanceD": { "$ref": "#/definitions/measure" }, 140 | "bridge": { "type": "boolean" }, 141 | "tunnel": { "type": "boolean" }, 142 | "roadGradientPercent": { "$ref": "#/definitions/measure" }, 143 | "lineage": { "type": "string" } 144 | } 145 | }, 146 | "parents": { 147 | "type": "array", 148 | "items": {"type": "string"} 149 | }, 150 | "geometry": { 151 | "type": "array", 152 | "items": { 153 | "oneOf": [ 154 | { "$ref": "geomprimitives.schema.json#/MultiLineString" } 155 | ] 156 | } 157 | } 158 | }, 159 | "required": [ "type", "parents", "geometry" ] 160 | } 161 | ] 162 | }, 163 | 164 | "+NoiseRailwaySegment": { 165 | "allOf": [ 166 | { "$ref": "cityobjects.schema.json#/_AbstractCityObject" }, 167 | { 168 | "properties": { 169 | "type": { "enum": [ "+NoiseRailwaySegment" ] }, 170 | "attributes": { 171 | "type": "object", 172 | "properties": { 173 | "railwaySurfaceMaterial": { "type": "string" }, 174 | "railwaySurfaceCorrection": { "$ref": "#/definitions/measure" }, 175 | "bridge": { "type": "boolean" }, 176 | "crossing": { "type": "boolean" }, 177 | "curveRadius": { "$ref": "#/definitions/measure" }, 178 | "additionalCorrectionSegment": { "$ref": "#/definitions/measure" } 179 | } 180 | }, 181 | "usedBy": { 182 | "type": "array", 183 | "items": { "$ref": "#/definitions/train" } 184 | }, 185 | "parents": { 186 | "type": "array", 187 | "items": {"type": "string"} 188 | }, 189 | "geometry": { 190 | "type": "array", 191 | "items": { 192 | "oneOf": [ 193 | { "$ref": "geomprimitives.schema.json#/MultiLineString" } 194 | ] 195 | } 196 | } 197 | }, 198 | "required": [ "type", "parents", "geometry" ] 199 | } 200 | ] 201 | } 202 | } 203 | 204 | } -------------------------------------------------------------------------------- /extensions/20/potato.ext.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "CityJSONExtension", 3 | "name": "Potato", 4 | "uri": "https://www.cityjson.org/extensions/download/potato.ext.json", 5 | "version": "1.0", 6 | "versionCityJSON": "2.0", 7 | "description": "Extension to handle massive potatoes in our cities", 8 | 9 | "extraRootProperties": {}, 10 | 11 | "extraAttributes": {}, 12 | 13 | "extraSemanticSurfaces": {}, 14 | 15 | "extraCityObjects": { 16 | "+Potato": { 17 | "allOf": [ 18 | { "$ref": "cityobjects.schema.json#/_AbstractCityObject" }, 19 | { 20 | "properties": { 21 | "type": { "enum": [ "+Potato" ] }, 22 | "attributes": { 23 | "type": "object", 24 | "properties": { 25 | "my-attribute": { "type": "string" } 26 | } 27 | }, 28 | "geometry": { 29 | "type": "array", 30 | "items": { 31 | "oneOf": [ 32 | { "$ref": "geomprimitives.schema.json#/MultiSurface" }, 33 | { "$ref": "geomprimitives.schema.json#/CompositeSurface" }, 34 | { "$ref": "geomprimitives.schema.json#/Solid" } 35 | ] 36 | } 37 | } 38 | }, 39 | "required": [ "type" ] 40 | } 41 | ] 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /extensions/readme.md: -------------------------------------------------------------------------------- 1 | 2 | The files `./11/extension.schema.json` and `./20/extension.schema.json` (respectively for v1.1 and v2.0) are the schemas to ensure that your CityJSON Extensions files are valid. 3 | To validate the validating file in other words. 4 | 5 | The simplest is to use a generic JSON schema validator, for example [this online one](https://jsonschemalint.com/#!/version/draft-07/markup/json), or to use the [binary cjvalext part of cjval](https://github.com/cityjson/cjval?tab=readme-ov-file#library--3-binaries). -------------------------------------------------------------------------------- /misc/README.txt: -------------------------------------------------------------------------------- 1 | 2 | ``` 3 | pip install jsonref==0.2 4 | `` 5 | 6 | 7 | https://jsonschemalint.com to test with the minified schemas, also includes a JSON linter -------------------------------------------------------------------------------- /misc/schema-minifier.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import json 4 | 5 | import jsonref #-- works *only* with json v0.2 6 | import importlib.metadata 7 | if importlib.metadata.version('jsonref') != '0.2': 8 | print("ERROR: you need jsonref v0.2: 'pip install jsonref==0.2'") 9 | sys.exit() 10 | 11 | 12 | #---------------------------- 13 | # cityjson.schema.json 14 | #---------------------------- 15 | root_schema = os.path.abspath('../schemas/cityjson.schema.json') 16 | fins = open(root_schema) 17 | 18 | abs_path = os.path.abspath(os.path.dirname(root_schema)) 19 | base_uri = 'file://{}/'.format(abs_path) 20 | 21 | js = jsonref.loads(fins.read(), jsonschema=True, base_uri=base_uri) 22 | 23 | # -- output stitched_schema 24 | json_str = jsonref.dumps(js, indent=2) 25 | # json_str = jsonref.dumps(js, separators=(',',':')) #-- this doesn't work: WTF 26 | opath = os.path.abspath('temp.json') 27 | f = open(opath, "w") 28 | f.write(json_str) 29 | 30 | f2 = open('./temp.json') 31 | j2 = json.loads(f2.read()) 32 | json_str2 = json.dumps(j2, separators=(',',':')) 33 | f = open("../schemas/cityjson.min.schema.json", "w") 34 | f.write(json_str2) 35 | 36 | 37 | #---------------------------- 38 | # cityjsonfeature.schema.json 39 | #---------------------------- 40 | root_schema = os.path.abspath('../schemas/cityjsonfeature.schema.json') 41 | fins = open(root_schema) 42 | 43 | abs_path = os.path.abspath(os.path.dirname(root_schema)) 44 | base_uri = 'file://{}/'.format(abs_path) 45 | 46 | js = jsonref.loads(fins.read(), jsonschema=True, base_uri=base_uri) 47 | 48 | # -- output stitched_schema 49 | json_str = jsonref.dumps(js, indent=2) 50 | # json_str = jsonref.dumps(js, separators=(',',':')) #-- this doesn't work: WTF 51 | opath = os.path.abspath('temp.json') 52 | f = open(opath, "w") 53 | f.write(json_str) 54 | 55 | f2 = open('./temp.json') 56 | j2 = json.loads(f2.read()) 57 | json_str2 = json.dumps(j2, separators=(',',':')) 58 | f = open("../schemas/cityjsonfeature.min.schema.json", "w") 59 | f.write(json_str2) 60 | -------------------------------------------------------------------------------- /schemas/appearance.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://www.cityjson.org/schemas/2.0.1/appearance.schema.json", 4 | "title": "CityJSON appearance schema v2.0.1", 5 | "Material": { 6 | "type": "object", 7 | "properties": { 8 | "name": { 9 | "type": "string" 10 | }, 11 | "ambientIntensity": { 12 | "type": "number" 13 | }, 14 | "diffuseColor": { 15 | "type": "array", 16 | "items": { 17 | "type": "number" 18 | }, 19 | "minItems": 3, 20 | "maxItems": 3 21 | }, 22 | "emissiveColor": { 23 | "type": "array", 24 | "items": { 25 | "type": "number" 26 | }, 27 | "minItems": 3, 28 | "maxItems": 3 29 | }, 30 | "specularColor": { 31 | "type": "array", 32 | "items": { 33 | "type": "number" 34 | }, 35 | "minItems": 3, 36 | "maxItems": 3 37 | }, 38 | "shininess": { 39 | "type": "number" 40 | }, 41 | "transparency": { 42 | "type": "number" 43 | }, 44 | "isSmooth": { 45 | "type": "boolean" 46 | } 47 | }, 48 | "required": [ 49 | "name" 50 | ], 51 | "additionalProperties": false 52 | }, 53 | "Texture": { 54 | "type": "object", 55 | "properties": { 56 | "type": { 57 | "enum": [ 58 | "PNG", 59 | "JPG" 60 | ] 61 | }, 62 | "image": { 63 | "type": "string" 64 | }, 65 | "wrapMode": { 66 | "enum": [ 67 | "none", 68 | "wrap", 69 | "mirror", 70 | "clamp", 71 | "border" 72 | ] 73 | }, 74 | "textureType": { 75 | "enum": [ 76 | "unknown", 77 | "specific", 78 | "typical" 79 | ] 80 | }, 81 | "borderColor": { 82 | "type": "array", 83 | "items": { 84 | "type": "number" 85 | }, 86 | "minItems": 3, 87 | "maxItems": 4 88 | } 89 | }, 90 | "additionalProperties": false 91 | } 92 | } -------------------------------------------------------------------------------- /schemas/cityjson.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://www.cityjson.org/schemas/2.0.1/cityjson.schema.json", 4 | "title": "CityJSON v2.0.1", 5 | "description": "CityJSON specifications v2.0.1", 6 | "type": "object", 7 | "properties": { 8 | "type": { 9 | "enum": [ 10 | "CityJSON" 11 | ] 12 | }, 13 | "version": { 14 | "enum": [ 15 | "2.0" 16 | ] 17 | }, 18 | "metadata": { 19 | "type": "object", 20 | "$ref": "metadata.schema.json#/metadata" 21 | }, 22 | "extensions": { 23 | "type": "object", 24 | "additionalProperties": { 25 | "type": "object", 26 | "properties": { 27 | "url": { 28 | "type": "string", 29 | "format": "uri-reference" 30 | }, 31 | "version": { 32 | "type": "string", 33 | "pattern": "^(\\d+\\.)(\\d+)$" 34 | } 35 | }, 36 | "required": [ 37 | "url", 38 | "version" 39 | ] 40 | } 41 | }, 42 | "CityObjects": { 43 | "type": "object", 44 | "additionalProperties": { 45 | "oneOf": [ 46 | { 47 | "$ref": "cityobjects.schema.json#/Bridge" 48 | }, 49 | { 50 | "$ref": "cityobjects.schema.json#/BridgeConstructiveElement" 51 | }, 52 | { 53 | "$ref": "cityobjects.schema.json#/BridgeFurniture" 54 | }, 55 | { 56 | "$ref": "cityobjects.schema.json#/BridgeInstallation" 57 | }, 58 | { 59 | "$ref": "cityobjects.schema.json#/BridgePart" 60 | }, 61 | { 62 | "$ref": "cityobjects.schema.json#/BridgeRoom" 63 | }, 64 | { 65 | "$ref": "cityobjects.schema.json#/Building" 66 | }, 67 | { 68 | "$ref": "cityobjects.schema.json#/BuildingConstructiveElement" 69 | }, 70 | { 71 | "$ref": "cityobjects.schema.json#/BuildingFurniture" 72 | }, 73 | { 74 | "$ref": "cityobjects.schema.json#/BuildingInstallation" 75 | }, 76 | { 77 | "$ref": "cityobjects.schema.json#/BuildingPart" 78 | }, 79 | { 80 | "$ref": "cityobjects.schema.json#/BuildingRoom" 81 | }, 82 | { 83 | "$ref": "cityobjects.schema.json#/BuildingStorey" 84 | }, 85 | { 86 | "$ref": "cityobjects.schema.json#/BuildingUnit" 87 | }, 88 | { 89 | "$ref": "cityobjects.schema.json#/CityFurniture" 90 | }, 91 | { 92 | "$ref": "cityobjects.schema.json#/CityObjectGroup" 93 | }, 94 | { 95 | "$ref": "cityobjects.schema.json#/ExtensionObject" 96 | }, 97 | { 98 | "$ref": "cityobjects.schema.json#/GenericCityObject" 99 | }, 100 | { 101 | "$ref": "cityobjects.schema.json#/LandUse" 102 | }, 103 | { 104 | "$ref": "cityobjects.schema.json#/OtherConstruction" 105 | }, 106 | { 107 | "$ref": "cityobjects.schema.json#/PlantCover" 108 | }, 109 | { 110 | "$ref": "cityobjects.schema.json#/Railway" 111 | }, 112 | { 113 | "$ref": "cityobjects.schema.json#/Road" 114 | }, 115 | { 116 | "$ref": "cityobjects.schema.json#/SolitaryVegetationObject" 117 | }, 118 | { 119 | "$ref": "cityobjects.schema.json#/TINRelief" 120 | }, 121 | { 122 | "$ref": "cityobjects.schema.json#/TransportSquare" 123 | }, 124 | { 125 | "$ref": "cityobjects.schema.json#/Tunnel" 126 | }, 127 | { 128 | "$ref": "cityobjects.schema.json#/TunnelConstructiveElement" 129 | }, 130 | { 131 | "$ref": "cityobjects.schema.json#/TunnelFurniture" 132 | }, 133 | { 134 | "$ref": "cityobjects.schema.json#/TunnelHollowSpace" 135 | }, 136 | { 137 | "$ref": "cityobjects.schema.json#/TunnelInstallation" 138 | }, 139 | { 140 | "$ref": "cityobjects.schema.json#/TunnelPart" 141 | }, 142 | { 143 | "$ref": "cityobjects.schema.json#/WaterBody" 144 | }, 145 | { 146 | "$ref": "cityobjects.schema.json#/Waterway" 147 | } 148 | ] 149 | } 150 | }, 151 | "vertices": { 152 | "type": "array", 153 | "items": { 154 | "type": "array", 155 | "items": { 156 | "type": "number" 157 | }, 158 | "minItems": 3, 159 | "maxItems": 3 160 | } 161 | }, 162 | "transform": { 163 | "type": "object", 164 | "properties": { 165 | "scale": { 166 | "type": "array", 167 | "items": { 168 | "type": "number" 169 | }, 170 | "minItems": 3, 171 | "maxItems": 3 172 | }, 173 | "translate": { 174 | "type": "array", 175 | "items": { 176 | "type": "number" 177 | }, 178 | "minItems": 3, 179 | "maxItems": 3 180 | } 181 | }, 182 | "required": [ 183 | "scale", 184 | "translate" 185 | ], 186 | "additionalProperties": false 187 | }, 188 | "appearance": { 189 | "type": "object", 190 | "properties": { 191 | "default-theme-texture": { 192 | "type": "string" 193 | }, 194 | "default-theme-material": { 195 | "type": "string" 196 | }, 197 | "materials": { 198 | "type": "array", 199 | "items": { 200 | "$ref": "appearance.schema.json#/Material" 201 | } 202 | }, 203 | "textures": { 204 | "type": "array", 205 | "items": { 206 | "$ref": "appearance.schema.json#/Texture" 207 | } 208 | }, 209 | "vertices-texture": { 210 | "type": "array", 211 | "items": { 212 | "type": "array", 213 | "items": { 214 | "type": "number" 215 | }, 216 | "minItems": 2, 217 | "maxItems": 2 218 | } 219 | } 220 | }, 221 | "additionalProperties": false 222 | }, 223 | "geometry-templates": { 224 | "type": "object", 225 | "properties": { 226 | "templates": { 227 | "type": "array", 228 | "items": { 229 | "oneOf": [ 230 | { 231 | "$ref": "geomprimitives.schema.json#/MultiPoint" 232 | }, 233 | { 234 | "$ref": "geomprimitives.schema.json#/MultiLineString" 235 | }, 236 | { 237 | "$ref": "geomprimitives.schema.json#/Solid" 238 | }, 239 | { 240 | "$ref": "geomprimitives.schema.json#/MultiSolid" 241 | }, 242 | { 243 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 244 | }, 245 | { 246 | "$ref": "geomprimitives.schema.json#/MultiSurface" 247 | }, 248 | { 249 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 250 | } 251 | ] 252 | } 253 | }, 254 | "vertices-templates": { 255 | "type": "array", 256 | "items": { 257 | "type": "array", 258 | "items": { 259 | "type": "number" 260 | }, 261 | "minItems": 3, 262 | "maxItems": 3 263 | } 264 | } 265 | }, 266 | "required": [ 267 | "templates", 268 | "vertices-templates" 269 | ], 270 | "additionalProperties": false 271 | } 272 | }, 273 | "required": [ 274 | "type", 275 | "transform", 276 | "version", 277 | "CityObjects", 278 | "vertices" 279 | ] 280 | } -------------------------------------------------------------------------------- /schemas/cityjsonfeature.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "title": "CityJSONFeature v2.0.1", 4 | "$id": "https://www.cityjson.org/schemas/2.0.1/cityjsonfeature.schema.json", 5 | "description": "CityJSONFeature schema v2.0.1", 6 | "type": "object", 7 | "properties": { 8 | "type": { 9 | "enum": [ 10 | "CityJSONFeature" 11 | ] 12 | }, 13 | "id": { "type": "string" }, 14 | "CityObjects": { 15 | "type": "object", 16 | "additionalProperties": { 17 | "oneOf": [ 18 | { 19 | "$ref": "cityobjects.schema.json#/Bridge" 20 | }, 21 | { 22 | "$ref": "cityobjects.schema.json#/BridgeConstructiveElement" 23 | }, 24 | { 25 | "$ref": "cityobjects.schema.json#/BridgeFurniture" 26 | }, 27 | { 28 | "$ref": "cityobjects.schema.json#/BridgeInstallation" 29 | }, 30 | { 31 | "$ref": "cityobjects.schema.json#/BridgePart" 32 | }, 33 | { 34 | "$ref": "cityobjects.schema.json#/BridgeRoom" 35 | }, 36 | { 37 | "$ref": "cityobjects.schema.json#/Building" 38 | }, 39 | { 40 | "$ref": "cityobjects.schema.json#/BuildingConstructiveElement" 41 | }, 42 | { 43 | "$ref": "cityobjects.schema.json#/BuildingFurniture" 44 | }, 45 | { 46 | "$ref": "cityobjects.schema.json#/BuildingInstallation" 47 | }, 48 | { 49 | "$ref": "cityobjects.schema.json#/BuildingPart" 50 | }, 51 | { 52 | "$ref": "cityobjects.schema.json#/BuildingRoom" 53 | }, 54 | { 55 | "$ref": "cityobjects.schema.json#/BuildingStorey" 56 | }, 57 | { 58 | "$ref": "cityobjects.schema.json#/BuildingUnit" 59 | }, 60 | { 61 | "$ref": "cityobjects.schema.json#/CityFurniture" 62 | }, 63 | { 64 | "$ref": "cityobjects.schema.json#/CityObjectGroup" 65 | }, 66 | { 67 | "$ref": "cityobjects.schema.json#/ExtensionObject" 68 | }, 69 | { 70 | "$ref": "cityobjects.schema.json#/GenericCityObject" 71 | }, 72 | { 73 | "$ref": "cityobjects.schema.json#/LandUse" 74 | }, 75 | { 76 | "$ref": "cityobjects.schema.json#/OtherConstruction" 77 | }, 78 | { 79 | "$ref": "cityobjects.schema.json#/PlantCover" 80 | }, 81 | { 82 | "$ref": "cityobjects.schema.json#/Railway" 83 | }, 84 | { 85 | "$ref": "cityobjects.schema.json#/Road" 86 | }, 87 | { 88 | "$ref": "cityobjects.schema.json#/SolitaryVegetationObject" 89 | }, 90 | { 91 | "$ref": "cityobjects.schema.json#/TINRelief" 92 | }, 93 | { 94 | "$ref": "cityobjects.schema.json#/TransportSquare" 95 | }, 96 | { 97 | "$ref": "cityobjects.schema.json#/Tunnel" 98 | }, 99 | { 100 | "$ref": "cityobjects.schema.json#/TunnelConstructiveElement" 101 | }, 102 | { 103 | "$ref": "cityobjects.schema.json#/TunnelFurniture" 104 | }, 105 | { 106 | "$ref": "cityobjects.schema.json#/TunnelHollowSpace" 107 | }, 108 | { 109 | "$ref": "cityobjects.schema.json#/TunnelInstallation" 110 | }, 111 | { 112 | "$ref": "cityobjects.schema.json#/TunnelPart" 113 | }, 114 | { 115 | "$ref": "cityobjects.schema.json#/WaterBody" 116 | }, 117 | { 118 | "$ref": "cityobjects.schema.json#/Waterway" 119 | } 120 | ] 121 | } 122 | }, 123 | "vertices": { 124 | "type": "array", 125 | "items": { 126 | "type": "array", 127 | "items": { 128 | "type": "number" 129 | }, 130 | "minItems": 3, 131 | "maxItems": 3 132 | } 133 | }, 134 | "appearance": { 135 | "type": "object", 136 | "properties": { 137 | "default-theme-texture": { 138 | "type": "string" 139 | }, 140 | "default-theme-material": { 141 | "type": "string" 142 | }, 143 | "materials": { 144 | "type": "array", 145 | "items": { 146 | "$ref": "appearance.schema.json#/Material" 147 | } 148 | }, 149 | "textures": { 150 | "type": "array", 151 | "items": { 152 | "$ref": "appearance.schema.json#/Texture" 153 | } 154 | }, 155 | "vertices-texture": { 156 | "type": "array", 157 | "items": { 158 | "type": "array", 159 | "items": { 160 | "type": "number" 161 | }, 162 | "minItems": 2, 163 | "maxItems": 2 164 | } 165 | } 166 | }, 167 | "additionalProperties": false 168 | } 169 | }, 170 | "required": [ 171 | "type", 172 | "id", 173 | "CityObjects", 174 | "vertices" 175 | ], 176 | "additionalProperties": false 177 | } -------------------------------------------------------------------------------- /schemas/cityobjects.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://www.cityjson.org/schemas/2.0.1/cityobjects.schema.json", 4 | "title": "CityJSON City Objects schema v2.0.1", 5 | 6 | "ExtensionObject": { 7 | "type": "object", 8 | "properties": { 9 | "type": { 10 | "type": "string", 11 | "pattern": "(\\+)([A-Z])\\w+" 12 | } 13 | }, 14 | "required": [ 15 | "type" 16 | ] 17 | }, 18 | "_AbstractCityObject": { 19 | "properties": { 20 | "attributes": { 21 | "type": "object" 22 | }, 23 | "parents": { 24 | "type": "array", 25 | "description": "the IDs of the parents", 26 | "items": { 27 | "type": "string" 28 | } 29 | }, 30 | "children": { 31 | "type": "array", 32 | "description": "the IDs of children", 33 | "items": { 34 | "type": "string" 35 | } 36 | }, 37 | "geographicalExtent": { 38 | "type": "array", 39 | "items": { 40 | "type": "number" 41 | }, 42 | "minItems": 6, 43 | "maxItems": 6 44 | } 45 | } 46 | }, 47 | "OtherConstruction": { 48 | "allOf": [ 49 | { 50 | "$ref": "#/_AbstractCityObject" 51 | }, 52 | { 53 | "properties": { 54 | "type": { 55 | "enum": [ 56 | "OtherConstruction" 57 | ] 58 | }, 59 | "geometry": { 60 | "type": "array", 61 | "items": { 62 | "oneOf": [ 63 | { 64 | "$ref": "geomprimitives.schema.json#/MultiPoint" 65 | }, 66 | { 67 | "$ref": "geomprimitives.schema.json#/MultiLineString" 68 | }, 69 | { 70 | "$ref": "geomprimitives.schema.json#/MultiSurface" 71 | }, 72 | { 73 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 74 | }, 75 | { 76 | "$ref": "geomprimitives.schema.json#/Solid" 77 | }, 78 | { 79 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 80 | }, 81 | { 82 | "$ref": "geomprimitives.schema.json#/MultiSolid" 83 | }, 84 | { 85 | "$ref": "geomtemplates.schema.json#/GeometryInstance" 86 | } 87 | ] 88 | } 89 | } 90 | }, 91 | "required": [ 92 | "type" 93 | ] 94 | } 95 | ] 96 | }, 97 | "_AbstractBuilding": { 98 | "allOf": [ 99 | { 100 | "$ref": "#/_AbstractCityObject" 101 | }, 102 | { 103 | "properties": { 104 | "address": { 105 | "type": "array", 106 | "items": { 107 | "type": "object", 108 | "properties": { 109 | "location": { 110 | "$ref": "geomprimitives.schema.json#/MultiPoint" 111 | } 112 | } 113 | } 114 | }, 115 | "geometry": { 116 | "type": "array", 117 | "items": { 118 | "oneOf": [ 119 | { 120 | "$ref": "geomprimitives.schema.json#/MultiSurface" 121 | }, 122 | { 123 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 124 | }, 125 | { 126 | "$ref": "geomprimitives.schema.json#/Solid" 127 | }, 128 | { 129 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 130 | } 131 | ] 132 | } 133 | } 134 | } 135 | } 136 | ] 137 | }, 138 | "Building": { 139 | "allOf": [ 140 | { 141 | "$ref": "#/_AbstractBuilding" 142 | }, 143 | { 144 | "properties": { 145 | "type": { 146 | "enum": [ 147 | "Building" 148 | ] 149 | } 150 | }, 151 | "required": [ 152 | "type" 153 | ] 154 | } 155 | ] 156 | }, 157 | "BuildingPart": { 158 | "allOf": [ 159 | { 160 | "$ref": "#/_AbstractBuilding" 161 | }, 162 | { 163 | "properties": { 164 | "type": { 165 | "enum": [ 166 | "BuildingPart" 167 | ] 168 | } 169 | }, 170 | "required": [ 171 | "type", 172 | "parents" 173 | ] 174 | } 175 | ] 176 | }, 177 | "BuildingInstallation": { 178 | "allOf": [ 179 | { 180 | "$ref": "#/_AbstractCityObject" 181 | }, 182 | { 183 | "properties": { 184 | "type": { 185 | "enum": [ 186 | "BuildingInstallation" 187 | ] 188 | }, 189 | "geometry": { 190 | "type": "array", 191 | "items": { 192 | "oneOf": [ 193 | { 194 | "$ref": "geomprimitives.schema.json#/MultiPoint" 195 | }, 196 | { 197 | "$ref": "geomprimitives.schema.json#/MultiLineString" 198 | }, 199 | { 200 | "$ref": "geomprimitives.schema.json#/MultiSurface" 201 | }, 202 | { 203 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 204 | }, 205 | { 206 | "$ref": "geomprimitives.schema.json#/Solid" 207 | }, 208 | { 209 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 210 | }, 211 | { 212 | "$ref": "geomprimitives.schema.json#/MultiSolid" 213 | }, 214 | { 215 | "$ref": "geomtemplates.schema.json#/GeometryInstance" 216 | } 217 | ] 218 | } 219 | } 220 | }, 221 | "required": [ 222 | "type", 223 | "parents" 224 | ] 225 | } 226 | ] 227 | }, 228 | "BuildingConstructiveElement": { 229 | "allOf": [ 230 | { 231 | "$ref": "#/_AbstractCityObject" 232 | }, 233 | { 234 | "properties": { 235 | "type": { 236 | "enum": [ 237 | "BuildingConstructiveElement" 238 | ] 239 | }, 240 | "geometry": { 241 | "type": "array", 242 | "items": { 243 | "oneOf": [ 244 | { 245 | "$ref": "geomprimitives.schema.json#/MultiPoint" 246 | }, 247 | { 248 | "$ref": "geomprimitives.schema.json#/MultiLineString" 249 | }, 250 | { 251 | "$ref": "geomprimitives.schema.json#/MultiSurface" 252 | }, 253 | { 254 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 255 | }, 256 | { 257 | "$ref": "geomprimitives.schema.json#/Solid" 258 | }, 259 | { 260 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 261 | }, 262 | { 263 | "$ref": "geomprimitives.schema.json#/MultiSolid" 264 | }, 265 | { 266 | "$ref": "geomtemplates.schema.json#/GeometryInstance" 267 | } 268 | ] 269 | } 270 | } 271 | }, 272 | "required": [ 273 | "type", 274 | "parents" 275 | ] 276 | } 277 | ] 278 | }, 279 | "BuildingFurniture": { 280 | "allOf": [ 281 | { 282 | "$ref": "#/_AbstractCityObject" 283 | }, 284 | { 285 | "properties": { 286 | "type": { 287 | "enum": [ 288 | "BuildingFurniture" 289 | ] 290 | }, 291 | "geometry": { 292 | "type": "array", 293 | "items": { 294 | "oneOf": [ 295 | { 296 | "$ref": "geomprimitives.schema.json#/MultiPoint" 297 | }, 298 | { 299 | "$ref": "geomprimitives.schema.json#/MultiLineString" 300 | }, 301 | { 302 | "$ref": "geomprimitives.schema.json#/MultiSurface" 303 | }, 304 | { 305 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 306 | }, 307 | { 308 | "$ref": "geomprimitives.schema.json#/Solid" 309 | }, 310 | { 311 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 312 | }, 313 | { 314 | "$ref": "geomprimitives.schema.json#/MultiSolid" 315 | }, 316 | { 317 | "$ref": "geomtemplates.schema.json#/GeometryInstance" 318 | } 319 | ] 320 | } 321 | } 322 | }, 323 | "required": [ 324 | "type", 325 | "parents" 326 | ] 327 | } 328 | ] 329 | }, 330 | "BuildingRoom": { 331 | "allOf": [ 332 | { 333 | "$ref": "#/_AbstractCityObject" 334 | }, 335 | { 336 | "properties": { 337 | "type": { 338 | "enum": [ 339 | "BuildingRoom" 340 | ] 341 | }, 342 | "geometry": { 343 | "type": "array", 344 | "items": { 345 | "oneOf": [ 346 | { 347 | "$ref": "geomprimitives.schema.json#/MultiSurface" 348 | }, 349 | { 350 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 351 | }, 352 | { 353 | "$ref": "geomprimitives.schema.json#/Solid" 354 | }, 355 | { 356 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 357 | } 358 | ] 359 | } 360 | } 361 | }, 362 | "required": [ 363 | "type", 364 | "parents" 365 | ] 366 | } 367 | ] 368 | }, 369 | "BuildingUnit": { 370 | "allOf": [ 371 | { 372 | "$ref": "#/_AbstractCityObject" 373 | }, 374 | { 375 | "properties": { 376 | "type": { 377 | "enum": [ 378 | "BuildingUnit" 379 | ] 380 | }, 381 | "address": { 382 | "type": "array", 383 | "items": { 384 | "type": "object", 385 | "properties": { 386 | "location": { 387 | "$ref": "geomprimitives.schema.json#/MultiPoint" 388 | } 389 | } 390 | } 391 | }, 392 | "geometry": { 393 | "type": "array", 394 | "items": { 395 | "oneOf": [ 396 | { 397 | "$ref": "geomprimitives.schema.json#/MultiSurface" 398 | }, 399 | { 400 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 401 | }, 402 | { 403 | "$ref": "geomprimitives.schema.json#/Solid" 404 | }, 405 | { 406 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 407 | } 408 | ] 409 | } 410 | } 411 | }, 412 | "required": [ 413 | "type", 414 | "parents" 415 | ] 416 | } 417 | ] 418 | }, 419 | "BuildingStorey": { 420 | "allOf": [ 421 | { 422 | "$ref": "#/_AbstractCityObject" 423 | }, 424 | { 425 | "properties": { 426 | "type": { 427 | "enum": [ 428 | "BuildingStorey" 429 | ] 430 | }, 431 | "geometry": { 432 | "type": "array", 433 | "items": { 434 | "oneOf": [ 435 | { 436 | "$ref": "geomprimitives.schema.json#/MultiSurface" 437 | }, 438 | { 439 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 440 | }, 441 | { 442 | "$ref": "geomprimitives.schema.json#/Solid" 443 | }, 444 | { 445 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 446 | } 447 | ] 448 | } 449 | } 450 | }, 451 | "required": [ 452 | "type", 453 | "parents" 454 | ] 455 | } 456 | ] 457 | }, 458 | "CityObjectGroup": { 459 | "allOf": [ 460 | { 461 | "$ref": "#/_AbstractCityObject" 462 | }, 463 | { 464 | "properties": { 465 | "type": { 466 | "enum": [ 467 | "CityObjectGroup" 468 | ] 469 | }, 470 | "children_roles": { 471 | "type": "array", 472 | "description": "the role of each of the CityObjects members of that group", 473 | "items": { 474 | "type": ["string", "null"] 475 | } 476 | }, 477 | "geometry": { 478 | "type": "array", 479 | "items": { 480 | "oneOf": [ 481 | { 482 | "$ref": "geomprimitives.schema.json#/MultiPoint" 483 | }, 484 | { 485 | "$ref": "geomprimitives.schema.json#/MultiLineString" 486 | }, 487 | { 488 | "$ref": "geomprimitives.schema.json#/MultiSurface" 489 | }, 490 | { 491 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 492 | }, 493 | { 494 | "$ref": "geomprimitives.schema.json#/Solid" 495 | }, 496 | { 497 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 498 | }, 499 | { 500 | "$ref": "geomprimitives.schema.json#/MultiSolid" 501 | } 502 | ] 503 | } 504 | } 505 | }, 506 | "required": [ 507 | "type", 508 | "children" 509 | ] 510 | } 511 | ] 512 | }, 513 | "GenericCityObject": { 514 | "allOf": [ 515 | { 516 | "$ref": "#/_AbstractCityObject" 517 | }, 518 | { 519 | "properties": { 520 | "type": { 521 | "enum": [ 522 | "GenericCityObject" 523 | ] 524 | }, 525 | "geometry": { 526 | "type": "array", 527 | "items": { 528 | "oneOf": [ 529 | { 530 | "$ref": "geomprimitives.schema.json#/MultiPoint" 531 | }, 532 | { 533 | "$ref": "geomprimitives.schema.json#/MultiLineString" 534 | }, 535 | { 536 | "$ref": "geomprimitives.schema.json#/Solid" 537 | }, 538 | { 539 | "$ref": "geomprimitives.schema.json#/MultiSolid" 540 | }, 541 | { 542 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 543 | }, 544 | { 545 | "$ref": "geomprimitives.schema.json#/MultiSurface" 546 | }, 547 | { 548 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 549 | }, 550 | { 551 | "$ref": "geomtemplates.schema.json#/GeometryInstance" 552 | } 553 | ] 554 | } 555 | } 556 | }, 557 | "required": [ 558 | "type" 559 | ] 560 | } 561 | ] 562 | }, 563 | "Tunnel": { 564 | "allOf": [ 565 | { 566 | "$ref": "#/_AbstractCityObject" 567 | }, 568 | { 569 | "properties": { 570 | "type": { 571 | "enum": [ 572 | "Tunnel" 573 | ] 574 | }, 575 | "geometry": { 576 | "type": "array", 577 | "items": { 578 | "oneOf": [ 579 | { 580 | "$ref": "geomprimitives.schema.json#/MultiSurface" 581 | }, 582 | { 583 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 584 | }, 585 | { 586 | "$ref": "geomprimitives.schema.json#/Solid" 587 | }, 588 | { 589 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 590 | } 591 | ] 592 | } 593 | } 594 | }, 595 | "required": [ 596 | "type" 597 | ] 598 | } 599 | ] 600 | }, 601 | "TunnelPart": { 602 | "allOf": [ 603 | { 604 | "$ref": "#/_AbstractCityObject" 605 | }, 606 | { 607 | "properties": { 608 | "type": { 609 | "enum": [ 610 | "TunnelPart" 611 | ] 612 | }, 613 | "geometry": { 614 | "type": "array", 615 | "items": { 616 | "oneOf": [ 617 | { 618 | "$ref": "geomprimitives.schema.json#/MultiSurface" 619 | }, 620 | { 621 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 622 | }, 623 | { 624 | "$ref": "geomprimitives.schema.json#/Solid" 625 | }, 626 | { 627 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 628 | } 629 | ] 630 | } 631 | } 632 | }, 633 | "required": [ 634 | "type", 635 | "parents" 636 | ] 637 | } 638 | ] 639 | }, 640 | "TunnelInstallation": { 641 | "allOf": [ 642 | { 643 | "$ref": "#/_AbstractCityObject" 644 | }, 645 | { 646 | "properties": { 647 | "type": { 648 | "enum": [ 649 | "TunnelInstallation" 650 | ] 651 | }, 652 | "geometry": { 653 | "type": "array", 654 | "items": { 655 | "oneOf": [ 656 | { 657 | "$ref": "geomprimitives.schema.json#/MultiPoint" 658 | }, 659 | { 660 | "$ref": "geomprimitives.schema.json#/MultiLineString" 661 | }, 662 | { 663 | "$ref": "geomprimitives.schema.json#/MultiSurface" 664 | }, 665 | { 666 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 667 | }, 668 | { 669 | "$ref": "geomprimitives.schema.json#/Solid" 670 | }, 671 | { 672 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 673 | }, 674 | { 675 | "$ref": "geomprimitives.schema.json#/MultiSolid" 676 | }, 677 | { 678 | "$ref": "geomtemplates.schema.json#/GeometryInstance" 679 | } 680 | ] 681 | } 682 | } 683 | }, 684 | "required": [ 685 | "type", 686 | "parents" 687 | ] 688 | } 689 | ] 690 | }, 691 | "TunnelConstructiveElement": { 692 | "allOf": [ 693 | { 694 | "$ref": "#/_AbstractCityObject" 695 | }, 696 | { 697 | "properties": { 698 | "type": { 699 | "enum": [ 700 | "TunnelConstructiveElement" 701 | ] 702 | }, 703 | "geometry": { 704 | "type": "array", 705 | "items": { 706 | "oneOf": [ 707 | { 708 | "$ref": "geomprimitives.schema.json#/MultiPoint" 709 | }, 710 | { 711 | "$ref": "geomprimitives.schema.json#/MultiLineString" 712 | }, 713 | { 714 | "$ref": "geomprimitives.schema.json#/MultiSurface" 715 | }, 716 | { 717 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 718 | }, 719 | { 720 | "$ref": "geomprimitives.schema.json#/Solid" 721 | }, 722 | { 723 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 724 | }, 725 | { 726 | "$ref": "geomprimitives.schema.json#/MultiSolid" 727 | }, 728 | { 729 | "$ref": "geomtemplates.schema.json#/GeometryInstance" 730 | } 731 | ] 732 | } 733 | } 734 | }, 735 | "required": [ 736 | "type", 737 | "parents" 738 | ] 739 | } 740 | ] 741 | }, 742 | "TunnelHollowSpace": { 743 | "allOf": [ 744 | { 745 | "$ref": "#/_AbstractCityObject" 746 | }, 747 | { 748 | "properties": { 749 | "type": { 750 | "enum": [ 751 | "TunnelHollowSpace" 752 | ] 753 | }, 754 | "geometry": { 755 | "type": "array", 756 | "items": { 757 | "oneOf": [ 758 | { 759 | "$ref": "geomprimitives.schema.json#/MultiSurface" 760 | }, 761 | { 762 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 763 | }, 764 | { 765 | "$ref": "geomprimitives.schema.json#/Solid" 766 | }, 767 | { 768 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 769 | } 770 | ] 771 | } 772 | } 773 | }, 774 | "required": [ 775 | "type", 776 | "parents" 777 | ] 778 | } 779 | ] 780 | }, 781 | "TunnelFurniture": { 782 | "allOf": [ 783 | { 784 | "$ref": "#/_AbstractCityObject" 785 | }, 786 | { 787 | "properties": { 788 | "type": { 789 | "enum": [ 790 | "TunnelFurniture" 791 | ] 792 | }, 793 | "geometry": { 794 | "type": "array", 795 | "items": { 796 | "oneOf": [ 797 | { 798 | "$ref": "geomprimitives.schema.json#/MultiPoint" 799 | }, 800 | { 801 | "$ref": "geomprimitives.schema.json#/MultiLineString" 802 | }, 803 | { 804 | "$ref": "geomprimitives.schema.json#/MultiSurface" 805 | }, 806 | { 807 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 808 | }, 809 | { 810 | "$ref": "geomprimitives.schema.json#/Solid" 811 | }, 812 | { 813 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 814 | }, 815 | { 816 | "$ref": "geomprimitives.schema.json#/MultiSolid" 817 | }, 818 | { 819 | "$ref": "geomtemplates.schema.json#/GeometryInstance" 820 | } 821 | ] 822 | } 823 | } 824 | }, 825 | "required": [ 826 | "type", 827 | "parents" 828 | ] 829 | } 830 | ] 831 | }, 832 | 833 | "Bridge": { 834 | "allOf": [ 835 | { 836 | "$ref": "#/_AbstractCityObject" 837 | }, 838 | { 839 | "properties": { 840 | "type": { 841 | "enum": [ 842 | "Bridge" 843 | ] 844 | }, 845 | "address": { 846 | "type": "array", 847 | "items": { 848 | "type": "object", 849 | "properties": { 850 | "location": { 851 | "$ref": "geomprimitives.schema.json#/MultiPoint" 852 | } 853 | } 854 | } 855 | }, 856 | "geometry": { 857 | "type": "array", 858 | "items": { 859 | "oneOf": [ 860 | { 861 | "$ref": "geomprimitives.schema.json#/MultiSurface" 862 | }, 863 | { 864 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 865 | }, 866 | { 867 | "$ref": "geomprimitives.schema.json#/Solid" 868 | }, 869 | { 870 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 871 | } 872 | ] 873 | } 874 | } 875 | }, 876 | "required": [ 877 | "type" 878 | ] 879 | } 880 | ] 881 | }, 882 | "BridgePart": { 883 | "allOf": [ 884 | { 885 | "$ref": "#/_AbstractCityObject" 886 | }, 887 | { 888 | "properties": { 889 | "type": { 890 | "enum": [ 891 | "BridgePart" 892 | ] 893 | }, 894 | "address": { 895 | "type": "array", 896 | "items": { 897 | "type": "object", 898 | "properties": { 899 | "location": { 900 | "$ref": "geomprimitives.schema.json#/MultiPoint" 901 | } 902 | } 903 | } 904 | }, 905 | "geometry": { 906 | "type": "array", 907 | "items": { 908 | "oneOf": [ 909 | { 910 | "$ref": "geomprimitives.schema.json#/MultiSurface" 911 | }, 912 | { 913 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 914 | }, 915 | { 916 | "$ref": "geomprimitives.schema.json#/Solid" 917 | }, 918 | { 919 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 920 | } 921 | ] 922 | } 923 | } 924 | }, 925 | "required": [ 926 | "type", 927 | "parents" 928 | ] 929 | } 930 | ] 931 | }, 932 | "BridgeInstallation": { 933 | "allOf": [ 934 | { 935 | "$ref": "#/_AbstractCityObject" 936 | }, 937 | { 938 | "properties": { 939 | "type": { 940 | "enum": [ 941 | "BridgeInstallation" 942 | ] 943 | }, 944 | "geometry": { 945 | "type": "array", 946 | "items": { 947 | "oneOf": [ 948 | { 949 | "$ref": "geomprimitives.schema.json#/MultiPoint" 950 | }, 951 | { 952 | "$ref": "geomprimitives.schema.json#/MultiLineString" 953 | }, 954 | { 955 | "$ref": "geomprimitives.schema.json#/MultiSurface" 956 | }, 957 | { 958 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 959 | }, 960 | { 961 | "$ref": "geomprimitives.schema.json#/Solid" 962 | }, 963 | { 964 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 965 | }, 966 | { 967 | "$ref": "geomprimitives.schema.json#/MultiSolid" 968 | }, 969 | { 970 | "$ref": "geomtemplates.schema.json#/GeometryInstance" 971 | } 972 | ] 973 | } 974 | } 975 | }, 976 | "required": [ 977 | "type", 978 | "parents" 979 | ] 980 | } 981 | ] 982 | }, 983 | "BridgeConstructiveElement": { 984 | "allOf": [ 985 | { 986 | "$ref": "#/_AbstractCityObject" 987 | }, 988 | { 989 | "properties": { 990 | "type": { 991 | "enum": [ 992 | "BridgeConstructiveElement" 993 | ] 994 | }, 995 | "geometry": { 996 | "type": "array", 997 | "items": { 998 | "oneOf": [ 999 | { 1000 | "$ref": "geomprimitives.schema.json#/MultiPoint" 1001 | }, 1002 | { 1003 | "$ref": "geomprimitives.schema.json#/MultiLineString" 1004 | }, 1005 | { 1006 | "$ref": "geomprimitives.schema.json#/MultiSurface" 1007 | }, 1008 | { 1009 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 1010 | }, 1011 | { 1012 | "$ref": "geomprimitives.schema.json#/Solid" 1013 | }, 1014 | { 1015 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 1016 | }, 1017 | { 1018 | "$ref": "geomprimitives.schema.json#/MultiSolid" 1019 | }, 1020 | { 1021 | "$ref": "geomtemplates.schema.json#/GeometryInstance" 1022 | } 1023 | ] 1024 | } 1025 | } 1026 | }, 1027 | "required": [ 1028 | "type", 1029 | "parents" 1030 | ] 1031 | } 1032 | ] 1033 | }, 1034 | "BridgeRoom": { 1035 | "allOf": [ 1036 | { 1037 | "$ref": "#/_AbstractCityObject" 1038 | }, 1039 | { 1040 | "properties": { 1041 | "type": { 1042 | "enum": [ 1043 | "BridgeRoom" 1044 | ] 1045 | }, 1046 | "geometry": { 1047 | "type": "array", 1048 | "items": { 1049 | "oneOf": [ 1050 | { 1051 | "$ref": "geomprimitives.schema.json#/MultiSurface" 1052 | }, 1053 | { 1054 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 1055 | }, 1056 | { 1057 | "$ref": "geomprimitives.schema.json#/Solid" 1058 | }, 1059 | { 1060 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 1061 | } 1062 | ] 1063 | } 1064 | } 1065 | }, 1066 | "required": [ 1067 | "type", 1068 | "parents" 1069 | ] 1070 | } 1071 | ] 1072 | }, 1073 | "BridgeFurniture": { 1074 | "allOf": [ 1075 | { 1076 | "$ref": "#/_AbstractCityObject" 1077 | }, 1078 | { 1079 | "properties": { 1080 | "type": { 1081 | "enum": [ 1082 | "BridgeFurniture" 1083 | ] 1084 | }, 1085 | "geometry": { 1086 | "type": "array", 1087 | "items": { 1088 | "oneOf": [ 1089 | { 1090 | "$ref": "geomprimitives.schema.json#/MultiPoint" 1091 | }, 1092 | { 1093 | "$ref": "geomprimitives.schema.json#/MultiLineString" 1094 | }, 1095 | { 1096 | "$ref": "geomprimitives.schema.json#/MultiSurface" 1097 | }, 1098 | { 1099 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 1100 | }, 1101 | { 1102 | "$ref": "geomprimitives.schema.json#/Solid" 1103 | }, 1104 | { 1105 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 1106 | }, 1107 | { 1108 | "$ref": "geomprimitives.schema.json#/MultiSolid" 1109 | }, 1110 | { 1111 | "$ref": "geomtemplates.schema.json#/GeometryInstance" 1112 | } 1113 | ] 1114 | } 1115 | } 1116 | }, 1117 | "required": [ 1118 | "type", 1119 | "parents" 1120 | ] 1121 | } 1122 | ] 1123 | }, 1124 | 1125 | "_AbstractTransportationComplex": { 1126 | "allOf": [ 1127 | { 1128 | "$ref": "#/_AbstractCityObject" 1129 | }, 1130 | { 1131 | "properties": { 1132 | "geometry": { 1133 | "type": "array", 1134 | "items": { 1135 | "oneOf": [ 1136 | { 1137 | "$ref": "geomprimitives.schema.json#/MultiLineString" 1138 | }, 1139 | { 1140 | "$ref": "geomprimitives.schema.json#/MultiSurface" 1141 | }, 1142 | { 1143 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 1144 | } 1145 | ] 1146 | } 1147 | } 1148 | } 1149 | } 1150 | ] 1151 | }, 1152 | "Road": { 1153 | "allOf": [ 1154 | { 1155 | "$ref": "#/_AbstractTransportationComplex" 1156 | }, 1157 | { 1158 | "properties": { 1159 | "type": { 1160 | "enum": [ 1161 | "Road" 1162 | ] 1163 | } 1164 | }, 1165 | "required": [ 1166 | "type" 1167 | ] 1168 | } 1169 | ] 1170 | }, 1171 | "Railway": { 1172 | "allOf": [ 1173 | { 1174 | "$ref": "#/_AbstractTransportationComplex" 1175 | }, 1176 | { 1177 | "properties": { 1178 | "type": { 1179 | "enum": [ 1180 | "Railway" 1181 | ] 1182 | } 1183 | }, 1184 | "required": [ 1185 | "type" 1186 | ] 1187 | } 1188 | ] 1189 | }, 1190 | "TransportSquare": { 1191 | "allOf": [ 1192 | { 1193 | "$ref": "#/_AbstractTransportationComplex" 1194 | }, 1195 | { 1196 | "properties": { 1197 | "type": { 1198 | "enum": [ 1199 | "TransportSquare" 1200 | ] 1201 | } 1202 | }, 1203 | "required": [ 1204 | "type" 1205 | ] 1206 | } 1207 | ] 1208 | }, 1209 | "Waterway": { 1210 | "allOf": [ 1211 | { 1212 | "$ref": "#/_AbstractTransportationComplex" 1213 | }, 1214 | { 1215 | "properties": { 1216 | "type": { 1217 | "enum": [ 1218 | "Waterway" 1219 | ] 1220 | } 1221 | }, 1222 | "required": [ 1223 | "type" 1224 | ] 1225 | } 1226 | ] 1227 | }, 1228 | "TINRelief": { 1229 | "allOf": [ 1230 | { 1231 | "$ref": "#/_AbstractCityObject" 1232 | }, 1233 | { 1234 | "properties": { 1235 | "type": { 1236 | "enum": [ 1237 | "TINRelief" 1238 | ] 1239 | }, 1240 | "geometry": { 1241 | "type": "array", 1242 | "items": { 1243 | "oneOf": [ 1244 | { 1245 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 1246 | } 1247 | ] 1248 | } 1249 | } 1250 | }, 1251 | "required": [ 1252 | "type" 1253 | ] 1254 | } 1255 | ] 1256 | }, 1257 | "WaterBody": { 1258 | "allOf": [ 1259 | { 1260 | "$ref": "#/_AbstractCityObject" 1261 | }, 1262 | { 1263 | "properties": { 1264 | "type": { 1265 | "enum": [ 1266 | "WaterBody" 1267 | ] 1268 | }, 1269 | "geometry": { 1270 | "type": "array", 1271 | "items": { 1272 | "oneOf": [ 1273 | { 1274 | "$ref": "geomprimitives.schema.json#/MultiLineString" 1275 | }, 1276 | { 1277 | "$ref": "geomprimitives.schema.json#/MultiSurface" 1278 | }, 1279 | { 1280 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 1281 | }, 1282 | { 1283 | "$ref": "geomprimitives.schema.json#/Solid" 1284 | }, 1285 | { 1286 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 1287 | } 1288 | ] 1289 | } 1290 | } 1291 | }, 1292 | "required": [ 1293 | "type" 1294 | ] 1295 | } 1296 | ] 1297 | }, 1298 | "PlantCover": { 1299 | "allOf": [ 1300 | { 1301 | "$ref": "#/_AbstractCityObject" 1302 | }, 1303 | { 1304 | "properties": { 1305 | "type": { 1306 | "enum": [ 1307 | "PlantCover" 1308 | ] 1309 | }, 1310 | "geometry": { 1311 | "type": "array", 1312 | "items": { 1313 | "oneOf": [ 1314 | { 1315 | "$ref": "geomprimitives.schema.json#/MultiSurface" 1316 | }, 1317 | { 1318 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 1319 | }, 1320 | { 1321 | "$ref": "geomprimitives.schema.json#/Solid" 1322 | }, 1323 | { 1324 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 1325 | }, 1326 | { 1327 | "$ref": "geomprimitives.schema.json#/MultiSolid" 1328 | } 1329 | ] 1330 | } 1331 | } 1332 | }, 1333 | "required": [ 1334 | "type" 1335 | ] 1336 | } 1337 | ] 1338 | }, 1339 | "SolitaryVegetationObject": { 1340 | "allOf": [ 1341 | { 1342 | "$ref": "#/_AbstractCityObject" 1343 | }, 1344 | { 1345 | "properties": { 1346 | "type": { 1347 | "enum": [ 1348 | "SolitaryVegetationObject" 1349 | ] 1350 | }, 1351 | "geometry": { 1352 | "type": "array", 1353 | "items": { 1354 | "oneOf": [ 1355 | { 1356 | "$ref": "geomprimitives.schema.json#/MultiPoint" 1357 | }, 1358 | { 1359 | "$ref": "geomprimitives.schema.json#/MultiLineString" 1360 | }, 1361 | { 1362 | "$ref": "geomprimitives.schema.json#/MultiSurface" 1363 | }, 1364 | { 1365 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 1366 | }, 1367 | { 1368 | "$ref": "geomprimitives.schema.json#/Solid" 1369 | }, 1370 | { 1371 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 1372 | }, 1373 | { 1374 | "$ref": "geomprimitives.schema.json#/MultiSolid" 1375 | }, 1376 | { 1377 | "$ref": "geomtemplates.schema.json#/GeometryInstance" 1378 | } 1379 | ] 1380 | } 1381 | } 1382 | }, 1383 | "required": [ 1384 | "type" 1385 | ] 1386 | } 1387 | ] 1388 | }, 1389 | "LandUse": { 1390 | "allOf": [ 1391 | { 1392 | "$ref": "#/_AbstractCityObject" 1393 | }, 1394 | { 1395 | "properties": { 1396 | "type": { 1397 | "enum": [ 1398 | "LandUse" 1399 | ] 1400 | }, 1401 | "geometry": { 1402 | "type": "array", 1403 | "items": { 1404 | "oneOf": [ 1405 | { 1406 | "$ref": "geomprimitives.schema.json#/MultiSurface" 1407 | }, 1408 | { 1409 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 1410 | } 1411 | ] 1412 | } 1413 | } 1414 | }, 1415 | "required": [ 1416 | "type" 1417 | ] 1418 | } 1419 | ] 1420 | }, 1421 | "CityFurniture": { 1422 | "allOf": [ 1423 | { 1424 | "$ref": "#/_AbstractCityObject" 1425 | }, 1426 | { 1427 | "properties": { 1428 | "type": { 1429 | "enum": [ 1430 | "CityFurniture" 1431 | ] 1432 | }, 1433 | "geometry": { 1434 | "type": "array", 1435 | "items": { 1436 | "oneOf": [ 1437 | { 1438 | "$ref": "geomprimitives.schema.json#/MultiPoint" 1439 | }, 1440 | { 1441 | "$ref": "geomprimitives.schema.json#/MultiLineString" 1442 | }, 1443 | { 1444 | "$ref": "geomprimitives.schema.json#/MultiSurface" 1445 | }, 1446 | { 1447 | "$ref": "geomprimitives.schema.json#/CompositeSurface" 1448 | }, 1449 | { 1450 | "$ref": "geomprimitives.schema.json#/Solid" 1451 | }, 1452 | { 1453 | "$ref": "geomprimitives.schema.json#/CompositeSolid" 1454 | }, 1455 | { 1456 | "$ref": "geomprimitives.schema.json#/MultiSolid" 1457 | }, 1458 | { 1459 | "$ref": "geomtemplates.schema.json#/GeometryInstance" 1460 | } 1461 | ] 1462 | } 1463 | } 1464 | }, 1465 | "required": [ 1466 | "type" 1467 | ] 1468 | } 1469 | ] 1470 | } 1471 | } -------------------------------------------------------------------------------- /schemas/geomprimitives.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://www.cityjson.org/schemas/2.0.1/geomprimitives.schema.json", 4 | "title": "CityJSON geometric primitives schema v2.0.1", 5 | "Semantics": { 6 | "type": "object", 7 | "properties": { 8 | "type": { 9 | "type": "string", 10 | "oneOf": [ 11 | { 12 | "enum": [ 13 | "RoofSurface" 14 | ] 15 | }, 16 | { 17 | "enum": [ 18 | "GroundSurface" 19 | ] 20 | }, 21 | { 22 | "enum": [ 23 | "WallSurface" 24 | ] 25 | }, 26 | { 27 | "enum": [ 28 | "ClosureSurface" 29 | ] 30 | }, 31 | { 32 | "enum": [ 33 | "OuterCeilingSurface" 34 | ] 35 | }, 36 | { 37 | "enum": [ 38 | "OuterFloorSurface" 39 | ] 40 | }, 41 | { 42 | "enum": [ 43 | "Window" 44 | ] 45 | }, 46 | { 47 | "enum": [ 48 | "Door" 49 | ] 50 | }, 51 | { 52 | "enum": [ 53 | "InteriorWallSurface" 54 | ] 55 | }, 56 | { 57 | "enum": [ 58 | "CeilingSurface" 59 | ] 60 | }, 61 | { 62 | "enum": [ 63 | "FloorSurface" 64 | ] 65 | }, 66 | { 67 | "enum": [ 68 | "WaterSurface" 69 | ] 70 | }, 71 | { 72 | "enum": [ 73 | "WaterGroundSurface" 74 | ] 75 | }, 76 | { 77 | "enum": [ 78 | "WaterClosureSurface" 79 | ] 80 | }, 81 | { 82 | "enum": [ 83 | "TrafficArea" 84 | ] 85 | }, 86 | { 87 | "enum": [ 88 | "AuxiliaryTrafficArea" 89 | ] 90 | }, 91 | { 92 | "enum": [ 93 | "TransportationHole" 94 | ] 95 | }, 96 | { 97 | "enum": [ 98 | "TransportationMarking" 99 | ] 100 | }, 101 | { 102 | "type": "string", 103 | "pattern": "(\\+)\\w+" 104 | } 105 | ] 106 | } 107 | }, 108 | "required": [ 109 | "type" 110 | ] 111 | }, 112 | "Lods": { 113 | "enum": [ 114 | "0", "1", "2", "3", 115 | "0.0", "0.1", "0.2", "0.3", 116 | "1.0", "1.1", "1.2", "1.3", 117 | "2.0", "2.1", "2.2", "2.3", 118 | "3.0", "3.1", "3.2", "3.3" 119 | ] 120 | }, 121 | "Solid": { 122 | "type": "object", 123 | "properties": { 124 | "type": { 125 | "enum": [ 126 | "Solid" 127 | ] 128 | }, 129 | "lod": { 130 | "$ref": "#/Lods" 131 | }, 132 | "boundaries": { 133 | "type": "array", 134 | "items": { 135 | "type": "array", 136 | "items": { 137 | "type": "array", 138 | "items": { 139 | "type": "array", 140 | "items": { 141 | "type": "integer" 142 | }, 143 | "minItems": 1 144 | }, 145 | "minItems": 1 146 | }, 147 | "minItems": 1 148 | }, 149 | "minItems": 1 150 | }, 151 | "semantics": { 152 | "type": "object", 153 | "properties": { 154 | "surfaces": { 155 | "type": "array", 156 | "items": { 157 | "$ref": "#/Semantics" 158 | } 159 | }, 160 | "values": { 161 | "type": [ 162 | "array", 163 | "null" 164 | ], 165 | "items": { 166 | "type": [ 167 | "array", 168 | "null" 169 | ], 170 | "items": { 171 | "type": [ 172 | "integer", 173 | "null" 174 | ] 175 | } 176 | } 177 | } 178 | }, 179 | "required": [ 180 | "surfaces", 181 | "values" 182 | ] 183 | }, 184 | "material": { 185 | "type": "object", 186 | "additionalProperties": { 187 | "type": "object", 188 | "properties": { 189 | "values": { 190 | "type": [ 191 | "array", 192 | "null" 193 | ], 194 | "items": { 195 | "type": [ 196 | "array", 197 | "null" 198 | ], 199 | "items": { 200 | "type": [ 201 | "integer", 202 | "null" 203 | ] 204 | } 205 | } 206 | }, 207 | "value": { 208 | "type": "integer" 209 | } 210 | }, 211 | "oneOf": [ 212 | { 213 | "required": [ 214 | "value" 215 | ] 216 | }, 217 | { 218 | "required": [ 219 | "values" 220 | ] 221 | } 222 | ] 223 | } 224 | }, 225 | "texture": { 226 | "type": "object", 227 | "additionalProperties": { 228 | "type": "object", 229 | "properties": { 230 | "values": { 231 | "type": "array", 232 | "items": { 233 | "type": "array", 234 | "items": { 235 | "type": "array", 236 | "items": { 237 | "type": "array", 238 | "items": { 239 | "type": [ 240 | "integer", 241 | "null" 242 | ] 243 | } 244 | } 245 | } 246 | } 247 | } 248 | } 249 | } 250 | } 251 | }, 252 | "required": [ 253 | "type", 254 | "lod", 255 | "boundaries" 256 | ], 257 | "additionalProperties": false 258 | }, 259 | "MultiSolid": { 260 | "type": "object", 261 | "properties": { 262 | "type": { 263 | "enum": [ 264 | "MultiSolid" 265 | ] 266 | }, 267 | "lod": { 268 | "$ref": "#/Lods" 269 | }, 270 | "boundaries": { 271 | "type": "array", 272 | "items": { 273 | "type": "array", 274 | "items": { 275 | "type": "array", 276 | "items": { 277 | "type": "array", 278 | "items": { 279 | "type": "array", 280 | "items": { 281 | "type": "integer" 282 | }, 283 | "minItems": 1 284 | }, 285 | "minItems": 1 286 | }, 287 | "minItems": 1 288 | }, 289 | "minItems": 1 290 | }, 291 | "minItems": 1 292 | }, 293 | "semantics": { 294 | "type": "object", 295 | "properties": { 296 | "surfaces": { 297 | "type": "array", 298 | "items": { 299 | "$ref": "#/Semantics" 300 | } 301 | }, 302 | "values": { 303 | "type": [ 304 | "array", 305 | "null" 306 | ], 307 | "items": { 308 | "type": [ 309 | "array", 310 | "null" 311 | ], 312 | "items": { 313 | "type": [ 314 | "array", 315 | "null" 316 | ], 317 | "items": { 318 | "type": [ 319 | "integer", 320 | "null" 321 | ] 322 | } 323 | } 324 | } 325 | } 326 | }, 327 | "required": [ 328 | "surfaces", 329 | "values" 330 | ] 331 | }, 332 | "material": { 333 | "type": "object", 334 | "additionalProperties": { 335 | "type": "object", 336 | "properties": { 337 | "values": { 338 | "type": [ 339 | "array", 340 | "null" 341 | ], 342 | "items": { 343 | "type": [ 344 | "array", 345 | "null" 346 | ], 347 | "items": { 348 | "type": [ 349 | "array", 350 | "null" 351 | ], 352 | "items": { 353 | "type": [ 354 | "integer", 355 | "null" 356 | ] 357 | } 358 | } 359 | } 360 | }, 361 | "value": { 362 | "type": "integer" 363 | } 364 | }, 365 | "oneOf": [ 366 | { 367 | "required": [ 368 | "value" 369 | ] 370 | }, 371 | { 372 | "required": [ 373 | "values" 374 | ] 375 | } 376 | ] 377 | } 378 | }, 379 | "texture": { 380 | "type": "object", 381 | "additionalProperties": { 382 | "type": "object", 383 | "properties": { 384 | "values": { 385 | "type": "array", 386 | "items": { 387 | "type": "array", 388 | "items": { 389 | "type": "array", 390 | "items": { 391 | "type": "array", 392 | "items": { 393 | "type": "array", 394 | "items": { 395 | "type": [ 396 | "integer", 397 | "null" 398 | ] 399 | } 400 | } 401 | } 402 | } 403 | } 404 | } 405 | } 406 | } 407 | } 408 | }, 409 | "required": [ 410 | "type", 411 | "lod", 412 | "boundaries" 413 | ], 414 | "additionalProperties": false 415 | }, 416 | "CompositeSolid": { 417 | "type": "object", 418 | "properties": { 419 | "type": { 420 | "enum": [ 421 | "CompositeSolid" 422 | ] 423 | }, 424 | "lod": { 425 | "$ref": "#/Lods" 426 | }, 427 | "boundaries": { 428 | "type": "array", 429 | "items": { 430 | "type": "array", 431 | "items": { 432 | "type": "array", 433 | "items": { 434 | "type": "array", 435 | "items": { 436 | "type": "array", 437 | "items": { 438 | "type": "integer" 439 | }, 440 | "minItems": 1 441 | }, 442 | "minItems": 1 443 | }, 444 | "minItems": 1 445 | }, 446 | "minItems": 1 447 | }, 448 | "minItems": 1 449 | }, 450 | "semantics": { 451 | "type": "object", 452 | "properties": { 453 | "surfaces": { 454 | "type": "array", 455 | "items": { 456 | "$ref": "#/Semantics" 457 | } 458 | }, 459 | "values": { 460 | "type": [ 461 | "array", 462 | "null" 463 | ], 464 | "items": { 465 | "type": [ 466 | "array", 467 | "null" 468 | ], 469 | "items": { 470 | "type": [ 471 | "array", 472 | "null" 473 | ], 474 | "items": { 475 | "type": [ 476 | "integer", 477 | "null" 478 | ] 479 | } 480 | } 481 | } 482 | } 483 | }, 484 | "required": [ 485 | "surfaces", 486 | "values" 487 | ] 488 | }, 489 | "material": { 490 | "type": "object", 491 | "additionalProperties": { 492 | "type": "object", 493 | "properties": { 494 | "values": { 495 | "type": [ 496 | "array", 497 | "null" 498 | ], 499 | "items": { 500 | "type": [ 501 | "array", 502 | "null" 503 | ], 504 | "items": { 505 | "type": [ 506 | "array", 507 | "null" 508 | ], 509 | "items": { 510 | "type": [ 511 | "integer", 512 | "null" 513 | ] 514 | } 515 | } 516 | } 517 | }, 518 | "value": { 519 | "type": "integer" 520 | } 521 | }, 522 | "oneOf": [ 523 | { 524 | "required": [ 525 | "value" 526 | ] 527 | }, 528 | { 529 | "required": [ 530 | "values" 531 | ] 532 | } 533 | ] 534 | } 535 | }, 536 | "texture": { 537 | "type": "object", 538 | "additionalProperties": { 539 | "type": "object", 540 | "properties": { 541 | "values": { 542 | "type": "array", 543 | "items": { 544 | "type": "array", 545 | "items": { 546 | "type": "array", 547 | "items": { 548 | "type": "array", 549 | "items": { 550 | "type": "array", 551 | "items": { 552 | "type": [ 553 | "integer", 554 | "null" 555 | ] 556 | } 557 | } 558 | } 559 | } 560 | } 561 | } 562 | } 563 | } 564 | } 565 | }, 566 | "required": [ 567 | "type", 568 | "lod", 569 | "boundaries" 570 | ], 571 | "additionalProperties": false 572 | }, 573 | "MultiSurface": { 574 | "type": "object", 575 | "properties": { 576 | "type": { 577 | "enum": [ 578 | "MultiSurface" 579 | ] 580 | }, 581 | "lod": { 582 | "$ref": "#/Lods" 583 | }, 584 | "boundaries": { 585 | "type": "array", 586 | "items": { 587 | "type": "array", 588 | "items": { 589 | "type": "array", 590 | "items": { 591 | "type": "integer" 592 | }, 593 | "minItems": 1 594 | }, 595 | "minItems": 1 596 | }, 597 | "minItems": 1 598 | }, 599 | "semantics": { 600 | "type": "object", 601 | "properties": { 602 | "surfaces": { 603 | "type": "array", 604 | "items": { 605 | "$ref": "#/Semantics" 606 | } 607 | }, 608 | "values": { 609 | "type": [ 610 | "array", 611 | "null" 612 | ], 613 | "items": { 614 | "type": [ 615 | "integer", 616 | "null" 617 | ] 618 | } 619 | } 620 | }, 621 | "required": [ 622 | "surfaces", 623 | "values" 624 | ] 625 | }, 626 | "material": { 627 | "type": "object", 628 | "additionalProperties": { 629 | "type": "object", 630 | "properties": { 631 | "values": { 632 | "type": [ 633 | "array", 634 | "null" 635 | ], 636 | "items": { 637 | "type": [ 638 | "integer", 639 | "null" 640 | ] 641 | } 642 | }, 643 | "value": { 644 | "type": "integer" 645 | } 646 | }, 647 | "oneOf": [ 648 | { 649 | "required": [ 650 | "value" 651 | ] 652 | }, 653 | { 654 | "required": [ 655 | "values" 656 | ] 657 | } 658 | ] 659 | } 660 | }, 661 | "texture": { 662 | "type": "object", 663 | "additionalProperties": { 664 | "type": "object", 665 | "properties": { 666 | "values": { 667 | "type": "array", 668 | "items": { 669 | "type": "array", 670 | "items": { 671 | "type": "array", 672 | "items": { 673 | "type": [ 674 | "integer", 675 | "null" 676 | ] 677 | } 678 | } 679 | } 680 | } 681 | } 682 | } 683 | } 684 | }, 685 | "required": [ 686 | "type", 687 | "lod", 688 | "boundaries" 689 | ], 690 | "additionalProperties": false 691 | }, 692 | "CompositeSurface": { 693 | "type": "object", 694 | "properties": { 695 | "type": { 696 | "enum": [ 697 | "CompositeSurface" 698 | ] 699 | }, 700 | "lod": { 701 | "$ref": "#/Lods" 702 | }, 703 | "boundaries": { 704 | "type": "array", 705 | "items": { 706 | "type": "array", 707 | "items": { 708 | "type": "array", 709 | "items": { 710 | "type": "integer" 711 | }, 712 | "minItems": 1 713 | }, 714 | "minItems": 1 715 | }, 716 | "minItems": 1 717 | }, 718 | "semantics": { 719 | "type": "object", 720 | "properties": { 721 | "surfaces": { 722 | "type": "array", 723 | "items": { 724 | "$ref": "#/Semantics" 725 | } 726 | }, 727 | "values": { 728 | "type": [ 729 | "array", 730 | "null" 731 | ], 732 | "items": { 733 | "type": [ 734 | "integer", 735 | "null" 736 | ] 737 | } 738 | } 739 | }, 740 | "required": [ 741 | "surfaces", 742 | "values" 743 | ] 744 | }, 745 | "material": { 746 | "type": "object", 747 | "additionalProperties": { 748 | "type": "object", 749 | "properties": { 750 | "values": { 751 | "type": [ 752 | "array", 753 | "null" 754 | ], 755 | "items": { 756 | "type": [ 757 | "integer", 758 | "null" 759 | ] 760 | } 761 | }, 762 | "value": { 763 | "type": "integer" 764 | } 765 | }, 766 | "oneOf": [ 767 | { 768 | "required": [ 769 | "value" 770 | ] 771 | }, 772 | { 773 | "required": [ 774 | "values" 775 | ] 776 | } 777 | ] 778 | } 779 | }, 780 | "texture": { 781 | "type": "object", 782 | "additionalProperties": { 783 | "type": "object", 784 | "properties": { 785 | "values": { 786 | "type": "array", 787 | "items": { 788 | "type": "array", 789 | "items": { 790 | "type": "array", 791 | "items": { 792 | "type": [ 793 | "integer", 794 | "null" 795 | ] 796 | } 797 | } 798 | } 799 | } 800 | } 801 | } 802 | } 803 | }, 804 | "required": [ 805 | "type", 806 | "lod", 807 | "boundaries" 808 | ], 809 | "additionalProperties": false 810 | }, 811 | "MultiLineString": { 812 | "type": "object", 813 | "properties": { 814 | "type": { 815 | "enum": [ 816 | "MultiLineString" 817 | ] 818 | }, 819 | "lod": { 820 | "$ref": "#/Lods" 821 | }, 822 | "boundaries": { 823 | "type": "array", 824 | "items": { 825 | "type": "array", 826 | "items": { 827 | "type": "integer" 828 | }, 829 | "minItems": 1 830 | }, 831 | "minItems": 1 832 | }, 833 | "semantics": { 834 | "type": "object", 835 | "properties": { 836 | "surfaces": { 837 | "type": "array", 838 | "items": { 839 | "$ref": "#/Semantics" 840 | } 841 | }, 842 | "values": { 843 | "type": [ 844 | "array", 845 | "null" 846 | ], 847 | "items": { 848 | "type": [ 849 | "integer", 850 | "null" 851 | ] 852 | } 853 | } 854 | }, 855 | "required": [ 856 | "surfaces", 857 | "values" 858 | ] 859 | } 860 | }, 861 | "required": [ 862 | "type", 863 | "lod", 864 | "boundaries" 865 | ], 866 | "additionalProperties": false 867 | }, 868 | "MultiPoint": { 869 | "type": "object", 870 | "properties": { 871 | "type": { 872 | "enum": [ 873 | "MultiPoint" 874 | ] 875 | }, 876 | "lod": { 877 | "$ref": "#/Lods" 878 | }, 879 | "boundaries": { 880 | "type": "array", 881 | "items": { 882 | "type": "integer" 883 | }, 884 | "minItems": 1 885 | }, 886 | "semantics": { 887 | "type": "object", 888 | "properties": { 889 | "surfaces": { 890 | "type": "array", 891 | "items": { 892 | "$ref": "#/Semantics" 893 | } 894 | }, 895 | "values": { 896 | "type": [ 897 | "array", 898 | "null" 899 | ], 900 | "items": { 901 | "type": [ 902 | "integer", 903 | "null" 904 | ] 905 | } 906 | } 907 | }, 908 | "required": [ 909 | "surfaces", 910 | "values" 911 | ] 912 | } 913 | }, 914 | "required": [ 915 | "type", 916 | "lod", 917 | "boundaries" 918 | ], 919 | "additionalProperties": false 920 | } 921 | } -------------------------------------------------------------------------------- /schemas/geomtemplates.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://www.cityjson.org/schemas/2.0.1/geomtemplates.schema.json", 4 | "title": "CityJSON geometry templates schema v2.0.1", 5 | "GeometryInstance": { 6 | "type": "object", 7 | "properties": { 8 | "type": { 9 | "enum": [ 10 | "GeometryInstance" 11 | ] 12 | }, 13 | "template": { 14 | "type": "integer" 15 | }, 16 | "boundaries": { 17 | "type": "array", 18 | "items": { 19 | "type": "integer" 20 | }, 21 | "minItems": 1, 22 | "maxItems": 1 23 | }, 24 | "transformationMatrix": { 25 | "type": "array", 26 | "items": { 27 | "type": "number" 28 | }, 29 | "minItems": 16, 30 | "maxItems": 16 31 | } 32 | }, 33 | "required": [ 34 | "type", 35 | "template", 36 | "boundaries", 37 | "transformationMatrix" 38 | ], 39 | "additionalProperties": false 40 | } 41 | } -------------------------------------------------------------------------------- /schemas/metadata.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://www.cityjson.org/schemas/2.0.1/metadata.schema.json", 4 | "title": "CityJSON metadata schema v2.0.1", 5 | 6 | "definitions": { 7 | "contactDetails": { 8 | "type": "object", 9 | "properties": { 10 | "contactName": { 11 | "type": "string" 12 | }, 13 | "phone": { 14 | "type": "string" 15 | }, 16 | "address": { 17 | "type": "object" 18 | }, 19 | "emailAddress": { 20 | "type": "string", 21 | "format": "email" 22 | }, 23 | "contactType": { 24 | "type": "string", 25 | "enum": [ "individual", "organization" ] 26 | }, 27 | "role": { 28 | "type": "string", 29 | "description": "from ISO 19115 codelist", 30 | "enum": [ 31 | "resourceProvider", 32 | "custodian", 33 | "owner", 34 | "user", 35 | "distributor", 36 | "originator", 37 | "pointOfContact", 38 | "principalInvestigator", 39 | "processor", 40 | "publisher", 41 | "author", 42 | "sponsor", 43 | "co-author", 44 | "collaborator", 45 | "editor", 46 | "mediator", 47 | "rightsHolder", 48 | "contributor", 49 | "funder", 50 | "stakeholder" 51 | ] 52 | }, 53 | "organization": { 54 | "type": "string" 55 | }, 56 | "website": { 57 | "type": "string", 58 | "format": "uri", 59 | "pattern": "^(https?)://" 60 | } 61 | }, 62 | "required": [ 63 | "contactName", 64 | "emailAddress" 65 | ] 66 | } 67 | }, 68 | "metadata": { 69 | "type": "object", 70 | "properties": { 71 | "identifier": { 72 | "type": "string" 73 | }, 74 | "pointOfContact": { 75 | "$ref": "#/definitions/contactDetails" 76 | }, 77 | "referenceDate": { 78 | "type": "string", 79 | "format": "date" 80 | }, 81 | "title": { 82 | "type": "string" 83 | }, 84 | "geographicalExtent": { 85 | "type": "array", 86 | "items": { 87 | "type": "number" 88 | }, 89 | "minItems": 6, 90 | "maxItems": 6 91 | }, 92 | "referenceSystem": { 93 | "type": "string", 94 | "pattern": "^(http|https)://www.opengis.net/def/crs/" 95 | } 96 | } 97 | } 98 | } -------------------------------------------------------------------------------- /specs/README.md: -------------------------------------------------------------------------------- 1 | 2 | This is a [bikeshed](https://github.com/tabatkins/bikeshed) file, very similar to Markdown. 3 | 4 | 5 | To compile with a nice CC0 logo and not the awful one by default in Bikeshed `python make.py` and this will generate a file `specs.html`. 6 | You must `pip install lxml beautifulsoup4`. 7 | 8 | 9 | To convert it to an HTML file with the ugly CC0 image directly: `curl https://api.csswg.org/bikeshed/ -F file=@specs.bs -F force=1 > specs.html` 10 | 11 | -------------------------------------------------------------------------------- /specs/figs/co.txt: -------------------------------------------------------------------------------- 1 | 2 | Bridge 3 | Building 4 | CityFurniture 5 | CityObjectGroup 6 | GenericCityObject 7 | LandUse 8 | OtherConstruction 9 | PlantCover 10 | SolitaryVegetationObject 11 | TINRelief 12 | Transportation 13 | Tunnel 14 | WaterBody 15 | 16 | Bridge 17 | BridgePart 18 | BridgeInstallation 19 | BridgeConstructiveElement 20 | BridgeRoom 21 | BridgeFurniture 22 | 23 | BuildingPart 24 | BuildingInstallation 25 | BuildingConstructiveElement 26 | BuildingFurniture 27 | BuildingStorey 28 | BuildingRoom 29 | BuildingUnit 30 | 31 | TunnelPart 32 | TunnelInstallation 33 | TunnelConstructiveElement 34 | TunnelHollowSpace 35 | TunnelFurniture -------------------------------------------------------------------------------- /specs/figs/figures.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cityjson/specs/babf23ac7cb552b5ce2b893b8031ba50a7339d2f/specs/figs/figures.graffle -------------------------------------------------------------------------------- /specs/make.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | from bs4 import BeautifulSoup 3 | 4 | a = subprocess.check_output(["curl", "https://api.csswg.org/bikeshed/", "-F", "file=@specs.bs", "-F", "force=1"]) 5 | soup = BeautifulSoup(a.decode('utf-8'), features="lxml") 6 | re = soup.find("p", class_="copyright") 7 | newp = BeautifulSoup('', features="lxml") 8 | re.insert_after(newp) 9 | re.decompose() 10 | fout = open('specs.html', 'w') 11 | fout.write(str(soup)) 12 | fout.close() 13 | 14 | 15 | --------------------------------------------------------------------------------