Skip to content

Commit 5cd302f

Browse files
Merge pull request #26 from geoadmin/feat-PB-1796-polish-visualize-data
PB-1796: Format and organize pages in Visualize Data section
2 parents 0f0f3e8 + 43b4915 commit 5cd302f

9 files changed

Lines changed: 571 additions & 764 deletions

File tree

.vitepress/config.mts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,18 @@ function visualizeDataItems(): DefaultTheme.SidebarItem[] {
153153
return [
154154
{ text: "WMS", link: "/docs/wms" },
155155
{ text: "WMTS", link: "/docs/wmts" },
156+
{ text: "XYZ", link: "/docs/xyz" },
156157
{
157-
text: "Mapbox Vector Tiles",
158-
link: "/docs/mapbox-vector-tiles",
158+
text: "Vector Tiles",
159+
link: "/docs/vector-tiles",
159160
},
160161
{
161-
text: "3D",
162-
link: "/docs/3d",
162+
text: "Terrain Service",
163+
link: "/docs/terrain-service",
164+
},
165+
{
166+
text: "3D Tiles",
167+
link: "/docs/3d-tiles",
163168
},
164169
];
165170
}

docs/3d-tiles.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# 3D Tiles
2+
3+
This service provides 3D tiles through a RESTful API, implementing the [Cesium 3D Tiles specification](https://github.com/CesiumGS/3d-tiles).
4+
5+
<ApiCodeBlock url="https://3d.geo.admin.ch/<LayerName>/<Version>/<Time>/<Z>/<X>/<Y>.b3dm" method="GET" />
6+
7+
Use the following parameters to define your request:
8+
9+
| Parameter | Example | Description |
10+
| --------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11+
| layerName | ch.swisstopo.swissbuildings3d.3d | The technical name of the 3D layer. Possible values are: `ch.swisstopo.swissbuildings3d.3d`, `ch.swisstopo.swisstlm3d.3d`, `ch.swisstopo.swissnames3d.3d`, `ch.swisstopo.vegetation.3d` |
12+
| Version | v1 | API version. `v1` means tiles generated with 3D Tiles |
13+
| Time | 20240501 | Date of tileset generation in (ISO-8601, e.g. YYYYMMDD) |
14+
| Z | 7 | Zoom level |
15+
| X | 54 | Tile column index |
16+
| Y | 21 | Tile row index |
17+
18+
A 3D tile request for swissBUILDINGS3D dataset:
19+
20+
```http
21+
curl -o demo.b3dm https://3d.geo.admin.ch/ch.swisstopo.swissbuildings3d.3d/v1/20240501/7/54/21.b3dm
22+
```
23+
24+
## Metadata
25+
26+
The `tileset.json` file describes the available set of tiles.
27+
It can be used directly by [CesiumJS](https://github.com/CesiumGS/cesium).
28+
29+
<ApiCodeBlock url="https://3d.geo.admin.ch/<LayerName>/<Version>/<Time>/tileset.json" method="GET" />
30+
31+
| Parameter | Example | Description |
32+
| --------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
33+
| Time (optional) | 20201203 | Date of tile generation in (ISO-8601). |
34+
| layerName | ch.swisstopo.swissbuildings3d.3d | The technical name of the 3D layer. Possible values are: `ch.swisstopo.swissbuildings3d.3d`, `ch.swisstopo.swisstlm3d.3d`, `ch.swisstopo.swissnames3d.3d`, `ch.swisstopo.vegetation.3d` |
35+
36+
A metadata request for the Vegetation dataset:
37+
38+
<ExampleCodeBlock
39+
request="curl https://3d.geo.admin.ch/ch.swisstopo.vegetation.3d/v1/tileset.json"
40+
example='{
41+
"asset": {
42+
"version": "1.0",
43+
"extras": {
44+
"ion": {
45+
"georeferenced": true,
46+
"movable": false
47+
}
48+
}
49+
},
50+
"geometricError": 54.7213621044866,
51+
"root": {
52+
"boundingVolume": {
53+
"region": [
54+
0.10395173048091878, 0.799669540091651, 0.18307746929258154,
55+
0.83441919811829, -10003.500000067055, 2799.070391970873
56+
]
57+
},
58+
"geometricError": 54.7213621044866,
59+
"refine": "ADD",
60+
"children": [...]
61+
}
62+
}'
63+
/>
64+
65+
## Example: Cesium
66+
67+
An example Cesium application using terrain tiles, 3D buildings and WMTS.
68+
69+
<iframe height="600" style="width: 100%;" scrolling="no" title="Geoadmin Terrain, Buildings and WMTS CesiumJS integration" src="https://codepen.io/geoadmin/embed/zBEYGE?default-tab=js%2Cresult&editable=true&zoom=0.5" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
70+
</iframe>

docs/3d.md

Lines changed: 0 additions & 82 deletions
This file was deleted.

docs/mapbox-vector-tiles.md

Lines changed: 0 additions & 65 deletions
This file was deleted.

docs/terrain-service.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Terrain Service
2+
3+
This service delivers multi-resolution 3D terrain data as quantized mesh tiles, fully compliant with the [Cesium Quantized Mesh 1.0 specification](https://github.com/AnalyticalGraphicsInc/quantized-mesh).
4+
Tiles are organized and served following the [Tile Map Service (TMS) specification](http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification) using a global-geodetic profile (latitude/longitude coordinates),
5+
6+
<ApiCodeBlock url="https://3d.geo.admin.ch/ch.swisstopo.terrain.3d/<Version>/<Time>/<Zoom>/<X>/<Y>.terrain" method="GET" />
7+
8+
Use the following parameters to define your request:
9+
10+
| Parameter | Example | Description |
11+
| ---------- | --------------- | -------------------------------------------------- |
12+
| ServerName | 3d.geo.admin.ch | |
13+
| Version | v1 | v1 means terrain tiles generated with cesium tiles |
14+
| Time | 20201203 | Date of tile generation in (ISO-8601). |
15+
| Zoom | 12 | Zoom level |
16+
| X | 4309 | The longitude index |
17+
| Y | 3111 | The latitude index |
18+
19+
An example of a terrain tile request:
20+
21+
```http
22+
curl -o demo.terrain https://3d.geo.admin.ch/ch.swisstopo.terrain.3d/v1/20201203/7/136/98.terrain?v=3924.0.0
23+
```
24+
25+
## Metadata
26+
27+
The `layer.json` file provides metadata that describes the availability and structure of the terrain tiles at a given timestamp.
28+
29+
<ApiCodeBlock url="https://3d.geo.admin.ch/ch.swisstopo.terrain.3d/v1/<Time>/layer.json" method="GET" />
30+
31+
| Parameter | Example | Description |
32+
| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------- |
33+
| Time (optional) | 20201203 | Date of tile generation in (ISO-8601). If no date is provided, it returns the metadata for the most recent terrain tiles. |
34+
35+
Example of a metadata request for the date `20201203`:
36+
37+
<ExampleCodeBlock
38+
request="curl --compressed https://3d.geo.admin.ch/ch.swisstopo.terrain.3d/v1/20201203/layer.json"
39+
example='{
40+
"attribution": "Put something there",
41+
"available": [...],
42+
"bounds": [-180, -90, 180, 90],
43+
"description": "Nice terrains",
44+
"format": "quantized-mesh-1.0",
45+
"minzoom": 0,
46+
"projection": "EPSG:4326",
47+
"scheme": "tms",
48+
"tilejson": "2.1.0",
49+
"tiles": ["{z}/{x}/{y}.terrain?v={version}"],
50+
"version": "3924.0.0"
51+
}'
52+
/>
53+
54+
## Example: Cesium
55+
56+
An example Cesium application using terrain tiles, 3D buildings and WMTS.
57+
58+
<iframe height="600" style="width: 100%;" scrolling="no" title="Geoadmin Terrain, Buildings and WMTS CesiumJS integration" src="https://codepen.io/geoadmin/embed/zBEYGE?default-tab=js%2Cresult&editable=true&zoom=0.5" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
59+
</iframe>

0 commit comments

Comments
 (0)