@cityjson/cj-mcp 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,93 @@
1
+ ## 7\. Handling large files[](#handling-large-files)
2
+
3
+ Because CityJSON aims at being easy-to-use and developer-friendly, it is advised to keep the size of CityJSON files small. Files of several hundreds of megabytes are bad practice, and should be avoided since users will have great difficulties visualising and manipulating them.
4
+
5
+ ### 7.1. Decomposing an area into parts/tiles[](#decomposing-an-area-into-parts-tiles)
6
+
7
+ One solution to handle a large dataset is to subdivide it into tiles or regions, and ensure that each part has a reasonable size. Each part becomes a CityJSON file.
8
+
9
+ ### 7.2. Text sequences and streaming with CityJSONFeature[](#text-sequences-and-streaming-with-cityjsonfeature)
10
+
11
+ Another solution is to decompose a CityJSON object into its _features_ (the City Objects), create several JSON objects, and store them in a [JSON Text Sequences](https://datatracker.ietf.org/doc/html/rfc7464) (one example being [JSON Lines](https://jsonlines.org)). This is a format to store several JSON objects in a single file, and allows the processing of each object one at a time.
12
+
13
+ A CityJSON Feature Object allows the storage of a single feature, for instance a `"Building"` together with its children (of type `"BuildingPart"` and/or `"BuildingInstallation"`). Unlike a CityJSON Object, all the vertices and appearances of the object are _local_.
14
+
15
+ A CityJSON Feature Object:
16
+
17
+ * is a JSON object.
18
+
19
+ * **must** have one member with the name `"type"`. The value must be `"CityJSONFeature"`.
20
+
21
+ * **must** have one member with the name `"id"`. The value must be a string representing the identifier of the City Object Feature. This is used to clearly identify which of the CityObjects is the parent.
22
+
23
+ * **must** have one member with the name `"CityObjects"`. The value is a collection of key-value pairs, where the key is the ID of the object, and the value is one City Object. The ID of a City Object should be unique (within one `"CityJSONFeature"`), and all the children of the `"CityJSONFeature"` must be included (and the children of the children (recursively), if there are any).
24
+
25
+ * **must** have one member with the name `"vertices"`. The value is an array of coordinates of each vertex of the current City Object Feature (stored with integers). Their position in this array (0-based) is used as an index to be referenced by the Geometry Objects for the JSON object (warning: the vertices are local to the JSON object).
26
+
27
+ * **may** have one member with the name `"appearance"`. The value may contain JSON objects representing the textures and/or materials of surfaces. See [§ 6 Appearance Object](#appearance-object) for details.
28
+
29
+ * **must not** have other members.
30
+
31
+
32
+ {
33
+ "type": "CityJSONFeature",
34
+ "id": "myid",
35
+ "CityObjects": {},
36
+ "vertices": \[\],
37
+ "appearance": {}
38
+ }
39
+
40
+ {
41
+ "type": "CityJSONFeature",
42
+ "id": "id-1",
43
+ "CityObjects": {
44
+ "id-1": {
45
+ "type": "Building",
46
+ "attributes": {
47
+ "roofType": "gabled roof"
48
+ },
49
+ "children": \["mypart"\],
50
+ "geometry": \[...\]
51
+ },
52
+ "mypart": {
53
+ "type": "BuildingPart",
54
+ "parents": \["id-1"\],
55
+ "children": \["mybalcony"\],
56
+ "geometry": \[...\]
57
+ },
58
+ "mybalcony": {
59
+ "type": "BuildingInstallation",
60
+ "parents": \["mypart"\],
61
+ "geometry": \[...\]
62
+ }
63
+ },
64
+ "vertices": \[...\]
65
+ }
66
+
67
+ The following root members of a CityJSON Object are not allowed in a CityJSONFeature Object:
68
+
69
+ * `"transform"`
70
+
71
+ * `"version"`
72
+
73
+ * `"metadata"`
74
+
75
+ * `"geometry-templates"`: these should either be resolved/dereferenced, or they should be placed in the metadata or collection
76
+
77
+ * `"extensions"`: these should be placed in the metadata or collection
78
+
79
+
80
+ Note that a CityJSON Feature Object does not contain all the information that is required for parsing the feature. Most commonly, the transformation properties (the Transform Object) and CRS must be known by the client in order to correctly georeference the City Objects. These properties may be known by the client upfront, or they may be accessible in a CityJSON Object, which is sent as the first object in a [JSON Lines text](https://jsonlines.org/) stream, or in other ways not described here (for instance RESTful APIs often have a mechanism to retrieve metadata).
81
+
82
+ In case the properties are stored in a CityJSON Object, this object needs to be a valid CityJSON Object. This implies that the CityJSON object must contain all the required properties, including `"CityObjects"` and `"vertices"`, even though they are empty, because this information is stored in the subsequent CityJSON Features.
83
+
84
+ Below is an example of a CityJSONFeature stream (or a JSON Lines text file), with a CityJSON Object storing the metadata and transformation properties, as well as geometry templates:
85
+
86
+ {"type":"CityJSON","version":"2.0","transform":{...},"CityObjects":{},"metadata":{...},"vertices":\[\], "geometry-templates":{...}}
87
+ {"type":"CityJSONFeature","id":"a","CityObjects":{...},"vertices":\[...\]}
88
+ {"type":"CityJSONFeature","id":"b","CityObjects":{...},"vertices":\[...\]}
89
+ {"type":"CityJSONFeature","id":"c","CityObjects":{...},"vertices":\[...\]}
90
+
91
+ > **Note:** **Suggested convention:** `"CityJSON"` and `"CityJSONFeature"` objects may be stored in a file with the extension `'.city.jsonl'`
92
+
93
+ > **Note:** Observe that CityJSON does not prescribe the format or standard that should be used to store several JSON objects in a given file, it only defines how `"CityJSON"` and `"CityJSONFeature"` objects should be defined.
@@ -0,0 +1,118 @@
1
+ ## 5\. Metadata[](#metadata)
2
+
3
+ The core of CityJSON supports the following six properties, which are compliant with the international standard [ISO19115](https://www.iso.org/standard/53798.html).
4
+
5
+ "metadata": {
6
+ "geographicalExtent": \[ 84710.1, 446846.0, \-5.3, 84757.1, 446944.0, 40.9 \],
7
+ "identifier": "eaeceeaa-3f66-429a-b81d-bbc6140b8c1c",
8
+ "pointOfContact": {
9
+ "contactName": "3D geoinformation group, Delft University of Technology",
10
+ "contactType": "organization",
11
+ "role": "owner",
12
+ "phone": "+31-6666666666",
13
+ "emailAddress": "3dgeoinfo-bk@tudelft.nl",
14
+ "website": "https://3d.bk.tudelft.nl",
15
+ "address": {
16
+ "thoroughfareNumber": "134",
17
+ "thoroughfareName": "Julianalaan",
18
+ "locality": "Delft",
19
+ "postcode": "2628BL",
20
+ "country": "the Netherlands"
21
+ }
22
+ },
23
+ "referenceDate": "1977-02-28",
24
+ "referenceSystem": "https://www.opengis.net/def/crs/EPSG/0/2355",
25
+ "title": "Buildings in LoD2.3 of Chibougamau, Québec"
26
+ }
27
+
28
+ > **Note:** The storage of additional ISO19115-compliant metadata attributes and/or of statistics related to 3D city models can be done with the [MetadataExtended Extension](https://github.com/cityjson/metadata-extended). Examples of extra attributes/properties that can be stored: point of contact for the dataset, lineage, statistics about the present LoDs, the presence of textures/materials, etc.
29
+
30
+ ### 5.1. geographicalExtent (bbox)[](#geographicalextent-bbox)
31
+
32
+ While the geographical extent can be computed from the dataset itself, it is often useful to store it. It may be stored as an array with 6 values: `[minx, miny, minz, maxx, maxy, maxz]`. Notice that these values are in the real-world coordinate system of the dataset (based on [§ 5.5 referenceSystem (CRS)](#referencesystem-crs)) and have not been compressed with the `"transform"` member ([§ 4 Transform Object](#transform-object)) as the `"vertices"` have been.
33
+
34
+ "metadata": {
35
+ "geographicalExtent": \[ 84710.1, 446846.0, \-5.3, 84757.1, 446944.0, 40.9 \]
36
+ }
37
+
38
+ ### 5.2. identifier[](#identifier)
39
+
40
+ A unique identifier for the dataset. It is recommended to use a [universally unique identifier](https://en.wikipedia.org/wiki/Universally_unique_identifier), but it is not obligatory.
41
+
42
+ "metadata": {
43
+ "identifier": "44574905-d2d2-4f40-8e96-d39e1ae45f70"
44
+ }
45
+
46
+ ### 5.3. pointOfContact[](#pointofcontact)
47
+
48
+ The point of contact for the dataset. This is a JSON object that
49
+
50
+ * **must** have one member with the name `"contactName"`. The value is the name of the contact.
51
+
52
+ * **must** have one member with the name `"emailAddress"`. The value is a string with the email.
53
+
54
+ * **may** have one member with the name `"role"`. The value describes the role that contact person/organisation has, it is one of the following: `"resourceProvider"`, `"custodian"`, `"owner"`, `"user"`, `"distributor"`, `"originator"`, `"pointOfContact"`, `"principalInvestigator"`, `"processor"`, `"publisher"`, `"author"`, `"sponsor"`, `"co-author"`, `"collaborator"`, `"editor"`, `"mediator"`, `"rightsHolder"`, `"contributor"`, `"funder"`, `"stakeholder"`.
55
+
56
+ * **may** have one member with the name `"website"`. The value is the URL of point of contact.
57
+
58
+ * **may** have one member with the name `"contactType"`. The value is a string which is either `"individual"` or `"organization"`. For an `"organization"`, the `"website"` can also be given.
59
+
60
+ * **may** have one member with the name `"address"`. The value is a JSON object and any properties can be used, to accommodate the different ways addresses are structured in different countries.
61
+
62
+ * **may** have one member with the name `"phone"`. The value is a string with the phone number.
63
+
64
+ * **may** have one member with the name `"organization"`. The value is the name of the organisation, to be used if the `"contactName"` is the name of a person.
65
+
66
+
67
+ "pointOfContact": {
68
+ "contactName": "Justin Trudeau",
69
+ "emailAddress": "justin.trudeau@parl.gc.ca",
70
+ "phone": "+1-613-992-4211",
71
+ "address": {
72
+ "thoroughfareNumber": "24",
73
+ "thoroughfareName": "Sussez Drive",
74
+ "postcode": "H0H 0H0",
75
+ "locality": "Ottawa",
76
+ "country": "Canada"
77
+ },
78
+ "contactType": "individual",
79
+ "role": "pointOfContact"
80
+ }
81
+
82
+ ### 5.4. referenceDate[](#referencedate)
83
+
84
+ The date when the dataset was compiled, without the time of the day, only a `"full-date"` as defined in [RFC 3339, Section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6) should be used.
85
+
86
+ "metadata": {
87
+ "referenceDate": "1977-02-28"
88
+ }
89
+
90
+ > **Note:** JSON does not have a date type, and thus the representations defined by [RFC 3339, Section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6) should be used. A simple date is `"full-date"` (thus `"1977-07-11"` as a string), and should be used for the metadata above.
91
+
92
+ Other attributes in a CityJSON object can also have a date with a time, and such an attribute is specified as a `"full-time"`. For example `"1985-04-12T23:20:50.52Z"` (stored as a string).
93
+
94
+ ### 5.5. referenceSystem (CRS)[](#referencesystem-crs)
95
+
96
+ The coordinate reference system (CRS) is given as a URL formatted according to the [OGC Name Type Specification](https://docs.opengeospatial.org/pol/09-048r5.html#_production_rule_for_specification_element_names):
97
+
98
+ http://www.opengis.net/def/crs/{authority}/{version}/{code}
99
+
100
+ where `{authority}` designates the authority responsible for the definition of this CRS (usually "EPSG" or "OGC"), and where `{version}` designates the specific version of the CRS ("0" (zero) is used if there is no version).
101
+
102
+ For instance, the Dutch national CRS in 3D:
103
+
104
+ "metadata": {
105
+ "referenceSystem": "https://www.opengis.net/def/crs/EPSG/0/7415"
106
+ }
107
+
108
+ Be aware that the CRS should be a three-dimensional one, ie the elevation/height values should be with respect to a specific datum.
109
+
110
+ > **Note:** Unlike in (City)GML where each object can have a different CRS (eg a wall of a building could theoretically have a different CRS from the other walls in the same the building), in CityJSON all the city objects need to be in the same CRS.
111
+
112
+ ### 5.6. title[](#title①)
113
+
114
+ A string describing the dataset.
115
+
116
+ "metadata": {
117
+ "title": "3D city model of Chibougamau, Canada"
118
+ }
@@ -0,0 +1,22 @@
1
+ ## Living Standard, 20 December 2025
2
+
3
+ **This version:**
4
+ : [https://cityjson.org/specs/2.0.1/](https://cityjson.org/specs/2.0.1/)
5
+
6
+ **Latest published version:**
7
+ : [https://cityjson.org/specs/](https://cityjson.org/specs/)
8
+
9
+ **Previous Versions:**
10
+ : [https://cityjson.org/specs/overview/](https://cityjson.org/specs/overview/)
11
+
12
+ **Feedback:**
13
+ : [GitHub](https://github.com/cityjson/specs/issues/)
14
+
15
+ **Editors:**
16
+ : [Hugo Ledoux](https://3d.bk.tudelft.nl/hledoux) (TU Delft)
17
+
18
+ : [Balázs Dukai](https://3dgi.nl) (3DGI)
19
+
20
+ [![CC0](https://licensebuttons.net/p/zero/1.0/80x15.png)](http://creativecommons.org/publicdomain/zero/1.0/) To the extent possible under law, the editors have waived all copyright and related or neighboring rights to this work. In addition, as of 20 December 2025, the editors have made this specification available under the [Open Web Foundation Agreement Version 1.0](https://www.openwebfoundation.org/the-agreements/the-owf-1-0-agreements-granted-claims/owfa-1-0), which is available at https://www.openwebfoundation.org/the-agreements/the-owf-1-0-agreements-granted-claims/owfa-1-0. Parts of this work may be from another specification document. If so, those parts are instead covered by the license of that specification document.
21
+
22
+ * * *