You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/topics/View3D.md
+59-1Lines changed: 59 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ To enable the 3D view, you need to configure the plugin in `config.json`. A typi
46
46
```
47
47
*NOTE*:
48
48
49
-
* The `menuItems` and `toolbarItems` can contain both 3D tools as well as generic tools (which are not specifically 2D map tools). If you run the 3D View in split-screen 3D+2D mode, only 3D tools will be displayed in the 3D window toolbar and menu. If you run the 3D View in fullscreen, all configured entries will be displayed.
49
+
* The `menuItems` and `toolbarItems` can contain both 3D tools as well as generic tools (which are not specifically 2D map tools). If you run the 3D View in split-screen 3D+2D mode, only 3D tools will be displayed in the 3D window toolbar and menu. If you run the 3D View in fullscreen, all configured entries will be displayed.
50
50
* Consult the [View3D plugin reference](../references/qwc2_plugins.md#view3d) as well as well as the [3D tool plugins reference](../references/qwc2_plugins.md#3d-plugins) for additional configuation options.
51
51
52
52
Next, to add a 3D View to a theme, add a `map3d` configuration to the desired theme item in [`themesConfig.json`](../configuration/ThemesConfiguration.md#manual-theme-configuration):
@@ -222,3 +222,61 @@ a possible `tileinfo` configuration in `tenantConfig.json` may look as follows:
222
222
### Import
223
223
224
224
To import scene objects in formats other than GLTF, a `ogcProcessesUrl` in `config.json` needs to point to a BBOX OGC processes server.
225
+
226
+
227
+
### Generating 3D tiles
228
+
229
+
QWC is specialized on 3D tiles in local coordinate reference systems. The following workflow shows all steps to a import CityGML model
230
+
in EPSG:25832 into a 3DCity PostgreSQL database and generating 3D tiles with attributes.
231
+
232
+
Create docker network:
233
+
```
234
+
docker network create citydb-net
235
+
```
236
+
237
+
Set PostgreSQL password:
238
+
```
239
+
export CITYDB_PASSWORD="citydb"
240
+
```
241
+
242
+
Start PostgreSQL database container:
243
+
```
244
+
docker run -t -d --rm --name citydb --network=citydb-net \
SELECT g.*, coalesce(p1.feature_id, g.feature_id) AS parent_feature_id, p2.val_uri AS gml_id, split_part(p3.val_string, '_', 2)::integer AS function, p4.val_string::integer AS roof_type
261
+
FROM geometry_data g
262
+
LEFT JOIN property p1 ON (p1.name = 'buildingPart' and p1.val_feature_id = g.feature_id)
263
+
LEFT JOIN property p2 ON (p2.name = 'externalReference' and p2.feature_id IN (p1.feature_id, g.feature_id))
264
+
LEFT JOIN property p3 ON (p3.name = 'function' and p3.feature_id IN (p1.feature_id, g.feature_id))
265
+
LEFT JOIN property p4 ON (p4.name = 'roofType' and p4.feature_id = g.feature_id)
266
+
WHERE ST_GeometryType(geometry) = 'ST_PolyhedralSurface'
267
+
"
268
+
```
269
+
270
+
Create a spatial index:
271
+
```
272
+
docker exec -it citydb psql -U citydb -d citydb -c "CREATE INDEX ON geometry_data USING gist(st_centroid(st_envelope(geometry)))"
0 commit comments