From c365e265e61fbc2a284bd4dfa407696c35749219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Dukai?= Date: Fri, 4 Oct 2024 15:09:56 +0200 Subject: [PATCH 1/4] templates and vertices-templates are mandatory if geometry-templates is defined --- specs/specs.bs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specs/specs.bs b/specs/specs.bs index af9cbba..09128d0 100644 --- a/specs/specs.bs +++ b/specs/specs.bs @@ -106,7 +106,10 @@ An "empty" but complete CityJSON object will look like this: "CityObjects": {}, "vertices": [], "appearance": {}, - "geometry-templates": {} + "geometry-templates": { + "templates": [], + "vertices-templates": [] + } } ``` From 4454a4bf1586b7f831ef96430fdc3db67292cc02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Dukai?= Date: Tue, 15 Oct 2024 07:37:01 +0200 Subject: [PATCH 2/4] geometry-templates templates and vertices-templates are optional So that it is consistent with the appearances and metadata. --- specs/specs.bs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/specs/specs.bs b/specs/specs.bs index 09128d0..36c7617 100644 --- a/specs/specs.bs +++ b/specs/specs.bs @@ -106,10 +106,7 @@ An "empty" but complete CityJSON object will look like this: "CityObjects": {}, "vertices": [], "appearance": {}, - "geometry-templates": { - "templates": [], - "vertices-templates": [] - } + "geometry-templates": {} } ``` @@ -1042,8 +1039,8 @@ By contrast, in CityGML, the geometry used for a given City Object is reused by The Geometry Templates are defined as a JSON object that: - - **must** have one member with the name `"templates"`. The value is an array of Geometry Objects. - - **must** have one member with the name `"vertices-templates"`. The value is an array of coordinates of each vertex of the templates (0-based indexing). The reason the vertices' indices are not global is to ensure that operations on the vertices (eg for CRS transformation, for [[#transform-object]], or calculating the bounding box of a dataset) will not be affected by the templates (since they will often be defined locally, and translated/rotated/scaled to their final position). + - **may** have one member with the name `"templates"`. The value is an array of Geometry Objects. + - **may** have one member with the name `"vertices-templates"`. The value is an array of coordinates of each vertex of the templates (0-based indexing). The reason the vertices' indices are not global is to ensure that operations on the vertices (eg for CRS transformation, for [[#transform-object]], or calculating the bounding box of a dataset) will not be affected by the templates (since they will often be defined locally, and translated/rotated/scaled to their final position). Observe that the geometry of a template can have semantic surfaces, and that appearances can be assigned to it. From c1a663d5bfa8ea64f884ba7e75f7744f48494fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Dukai?= Date: Tue, 15 Oct 2024 07:38:52 +0200 Subject: [PATCH 3/4] Clarify that the main Metadata properties are optional --- specs/specs.bs | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/specs.bs b/specs/specs.bs index 36c7617..028810c 100644 --- a/specs/specs.bs +++ b/specs/specs.bs @@ -1147,6 +1147,7 @@ v[2] = (vi[2] * ["transform"]["scale"][2]) + ["transform"]["translate"][2] # Metadata The core of CityJSON supports the following six properties, which are compliant with the international standard [ISO19115](https://www.iso.org/standard/53798.html). +All six main Metadata properties are optional. ```json "metadata": { From 082cf15077b87a0dc77a46669daac1862fe75fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Dukai?= Date: Tue, 15 Oct 2024 20:54:54 +0200 Subject: [PATCH 4/4] Revert "geometry-templates templates and vertices-templates are optional" This reverts commit 4454a4bf1586b7f831ef96430fdc3db67292cc02. --- specs/specs.bs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/specs/specs.bs b/specs/specs.bs index 028810c..dd3a909 100644 --- a/specs/specs.bs +++ b/specs/specs.bs @@ -106,7 +106,10 @@ An "empty" but complete CityJSON object will look like this: "CityObjects": {}, "vertices": [], "appearance": {}, - "geometry-templates": {} + "geometry-templates": { + "templates": [], + "vertices-templates": [] + } } ``` @@ -1039,8 +1042,8 @@ By contrast, in CityGML, the geometry used for a given City Object is reused by The Geometry Templates are defined as a JSON object that: - - **may** have one member with the name `"templates"`. The value is an array of Geometry Objects. - - **may** have one member with the name `"vertices-templates"`. The value is an array of coordinates of each vertex of the templates (0-based indexing). The reason the vertices' indices are not global is to ensure that operations on the vertices (eg for CRS transformation, for [[#transform-object]], or calculating the bounding box of a dataset) will not be affected by the templates (since they will often be defined locally, and translated/rotated/scaled to their final position). + - **must** have one member with the name `"templates"`. The value is an array of Geometry Objects. + - **must** have one member with the name `"vertices-templates"`. The value is an array of coordinates of each vertex of the templates (0-based indexing). The reason the vertices' indices are not global is to ensure that operations on the vertices (eg for CRS transformation, for [[#transform-object]], or calculating the bounding box of a dataset) will not be affected by the templates (since they will often be defined locally, and translated/rotated/scaled to their final position). Observe that the geometry of a template can have semantic surfaces, and that appearances can be assigned to it.