diff --git a/3DGeoVolumes/collections/Stuttgart/Stuttgart.json b/3DGeoVolumes/collections/Stuttgart/Stuttgart.json new file mode 100644 index 0000000000000000000000000000000000000000..2644d4fc84c90771806f3ff933681a118853bd76 --- /dev/null +++ b/3DGeoVolumes/collections/Stuttgart/Stuttgart.json @@ -0,0 +1,111 @@ +{ + "links": [ + { + "rel": "self", + "href": "host_url/collections/Stuttgart", + "type": "application/json", + "title": "Stuttgart 3D models" + } + ], + "collections": [ + { + "id": "Stuttgart", + "title": "Stuttgart 3D Models Demo", + "description": "All Supported 3D Containers for the city of Stuttgart LoD 1 from OSM with Textures", + "collectiontype": "3d-container", + "extent": { + "spatial": { + "bbox": [ + [9.161434,48.771841,-10,9.183426,48.786318,550] + ], + "crs": "http://www.opengis.net/def/crs/OGC/0/CRS84h" + } + }, + "links": [ + { + "rel": "collections", + "href": "host_url/collections/", + "type": "application/json" + }, + { + "title": "Stuttgart 3D Building Model (LoD 1) - Collections", + "rel": "self", + "href": "host_url/collections/Stuttgart_LoD1_OSM_Textures/", + "type": "application/json" + }, + { + "title": "Stuttgart 3D Building Model (LoD 1) : 3D Tiles", + "rel": "items", + "href": "https://steinbeis-3dps.eu/3DGeoVolumes/collections/Stuttgart/Stuttgart_3DBuildings_LoD1/3dtiles/", + "type": "application/json+3dtiles" + } + ], + "children": [ + { + "id": "Stuttgart_LOD2_Stadtmitte", + "title": "Stuttgart 3D Models LOD2 Stadtmitte Demo", + "description": "All Supported 3D Containers for the city of Stuttgart 3D Models LOD2 Stadtmitte", + "collectiontype": "3d-container", + "extent": { + "spatial": { + "bbox": [ + [9.161434,48.771841,-10,9.183426,48.786318,550] + ], + "crs": "http://www.opengis.net/def/crs/OGC/0/CRS84h" + } + }, + "links": [ + { + "rel": "collections", + "href": "host_url/collections/", + "type": "application/json" + }, + { + "title": "Stuttgart LOD2 Stadtmitte - Collections", + "rel": "self", + "href": "host_url/collections/Stuttgart/Stuttgart_LOD2_Stadtmitte", + "type": "application/json" + }, + { + "title": "Stuttgart LOD2 Stadtmitte : 3D Tiles", + "rel": "items", + "href": "http://193.196.37.89:8092/AssetsHFT/3DTile_Stuttgart_City_LoD2_InnenStadt_ClampToGround/tileset.json", + "type": "application/json+3dtiles" + } + ], + "children": [ + + ], + "content": [ + { + "title": "Stuttgart LOD2 Stadtmitte - Collections", + "rel": "original", + "href": "host_url/collections/Stuttgart/Stuttgart_LOD2_Stadtmitte", + "type": "application/json" + }, + { + "title": "Stuttgart LOD2 Stadtmitte : 3D Tiles", + "rel": "original", + "href": "http://193.196.37.89:8092/AssetsHFT/3DTile_Stuttgart_City_LoD2_InnenStadt_ClampToGround/tileset.json", + "type": "application/json+3dtiles" + } + ] + } + ], + "content": [ + { + "title": "Stuttgart 3D Building Model (LoD 1) - Collections", + "rel": "original", + "href": "host_url/collections/Stuttgart_LoD1_OSM_Textures/", + "type": "application/json" + }, + { + "title": "Stuttgart 3D Building Model (LoD 1) : 3D Tiles", + "rel": "original", + "href": "https://steinbeis-3dps.eu/3DGeoVolumes/collections/Stuttgart/Stuttgart_3DBuildings_LoD1/3dtiles/", + "type": "application/json+3dtiles" + } + ] + } + ] + } \ No newline at end of file diff --git a/3DGeoVolumes/collections/Stuttgart/Stuttgart_LOD2_Stadtmitte/Stuttgart_LOD2_Stadtmitte.json b/3DGeoVolumes/collections/Stuttgart/Stuttgart_LOD2_Stadtmitte/Stuttgart_LOD2_Stadtmitte.json new file mode 100644 index 0000000000000000000000000000000000000000..705110f615ae5c740aa330f43ba3b920c8851171 --- /dev/null +++ b/3DGeoVolumes/collections/Stuttgart/Stuttgart_LOD2_Stadtmitte/Stuttgart_LOD2_Stadtmitte.json @@ -0,0 +1,62 @@ +{ + "links": [ + { + "rel": "self", + "href": "host_url/collections/Stuttgart/Stuttgart_LOD2_Stadtmitte", + "type": "application/json", + "title": "Stuttgart LOD 2 3D models" + } + ], + "collections": [ + { + "id": "Stuttgart_LOD2_Stadtmitte", + "title": "Stuttgart 3D Models LOD2 Stadtmitte Demo", + "description": "All Supported 3D Containers for the city of Stuttgart 3D Models LOD2 Stadtmitte", + "collectiontype": "3d-container", + "extent": { + "spatial": { + "bbox": [ + [9.161434,48.771841,-10,9.183426,48.786318,550] + ], + "crs": "http://www.opengis.net/def/crs/OGC/0/CRS84h" + } + }, + "links": [ + { + "rel": "collections", + "href": "host_url/collections/", + "type": "application/json" + }, + { + "title": "Stuttgart LOD2 Stadtmitte - Collections", + "rel": "self", + "href": "host_url/collections/Stuttgart/Stuttgart_LOD2_Stadtmitte", + "type": "application/json" + }, + { + "title": "Stuttgart LOD2 Stadtmitte : 3D Tiles", + "rel": "items", + "href": "http://193.196.37.89:8092/AssetsHFT/3DTile_Stuttgart_City_LoD2_InnenStadt_ClampToGround/tileset.json", + "type": "application/json+3dtiles" + } + ], + "children": [ + + ], + "content": [ + { + "title": "Stuttgart LOD2 Stadtmitte - Collections", + "rel": "original", + "href": "host_url/collections/Stuttgart/Stuttgart_LOD2_Stadtmitte", + "type": "application/json" + }, + { + "title": "Stuttgart LOD2 Stadtmitte : 3D Tiles", + "rel": "original", + "href": "http://193.196.37.89:8092/AssetsHFT/3DTile_Stuttgart_City_LoD2_InnenStadt_ClampToGround/tileset.json", + "type": "application/json+3dtiles" + } + ] + } + ] + } \ No newline at end of file diff --git a/3DGeoVolumes/collections/collections.json b/3DGeoVolumes/collections/collections.json index 49f0cc2e90513bda594ba85105b21e55569ef0c8..4ed1273af5bf14ccc8a3b723d586d6d027cebf92 100644 --- a/3DGeoVolumes/collections/collections.json +++ b/3DGeoVolumes/collections/collections.json @@ -1,7 +1,7 @@ { "links": [ { - "rel": "self", + "rel": "original", "href": "host_url/collections", "type": "application/json", "title": "All geospatial data available from this API" @@ -70,6 +70,105 @@ "type": "application/json+i3s" } ] + }, + { + "id": "Stuttgart", + "title": "Stuttgart 3D Models Demo", + "description": "All Supported 3D Containers for the city of Stuttgart LoD 1 from OSM with Textures", + "collectiontype": "3d-container", + "extent": { + "spatial": { + "bbox": [ + [9.161434,48.771841,-10,9.183426,48.786318,550] + ], + "crs": "http://www.opengis.net/def/crs/OGC/0/CRS84h" + } + }, + "links": [ + { + "rel": "collections", + "href": "host_url/collections/", + "type": "application/json" + }, + { + "title": "Stuttgart 3D Building Model - Collections", + "rel": "self", + "href": "host_url/collections/Stuttgart/", + "type": "application/json" + }, + { + "title": "Stuttgart 3D Building Model (LoD 1) : 3D Tiles", + "rel": "items", + "href": "https://steinbeis-3dps.eu/3DGeoVolumes/collections/Stuttgart/Stuttgart_3DBuildings_LoD1/3dtiles/", + "type": "application/json+3dtiles" + } + ], + "children": [ + { + "id": "Stuttgart_LOD2_Stadtmitte", + "title": "Stuttgart 3D Models LOD2 Stadtmitte Demo", + "description": "All Supported 3D Containers for the city of Stuttgart 3D Models LOD2 Stadtmitte", + "collectiontype": "3d-container", + "extent": { + "spatial": { + "bbox": [ + [9.161434,48.771841,-10,9.183426,48.786318,550] + ], + "crs": "http://www.opengis.net/def/crs/OGC/0/CRS84h" + } + }, + "links": [ + { + "rel": "collections", + "href": "host_url/collections/", + "type": "application/json" + }, + { + "title": "Stuttgart LOD2 Stadtmitte - Collections", + "rel": "self", + "href": "host_url/collections/Stuttgart/Stuttgart_LOD2_Stadtmitte", + "type": "application/json" + }, + { + "title": "Stuttgart LOD2 Stadtmitte : 3D Tiles", + "rel": "items", + "href": "http://193.196.37.89:8092/AssetsHFT/3DTile_Stuttgart_City_LoD2_InnenStadt_ClampToGround/tileset.json", + "type": "application/json+3dtiles" + } + ], + "children": [ + + ], + "content": [ + { + "title": "Stuttgart LOD2 Stadtmitte - Collections", + "rel": "original", + "href": "host_url/collections/Stuttgart/Stuttgart_LOD2_Stadtmitte", + "type": "application/json" + }, + { + "title": "Stuttgart LOD2 Stadtmitte : 3D Tiles", + "rel": "original", + "href": "http://193.196.37.89:8092/AssetsHFT/3DTile_Stuttgart_City_LoD2_InnenStadt_ClampToGround/tileset.json", + "type": "application/json+3dtiles" + } + ] + } + ], + "content": [ + { + "title": "Stuttgart 3D Building Model - Collections", + "rel": "original", + "href": "host_url/collections/Stuttgart/", + "type": "application/json" + }, + { + "title": "Stuttgart 3D Building Model (LoD 1) : 3D Tiles", + "rel": "original", + "href": "https://steinbeis-3dps.eu/3DGeoVolumes/collections/Stuttgart/Stuttgart_3DBuildings_LoD1/3dtiles/", + "type": "application/json+3dtiles" + } + ] } ] } \ No newline at end of file diff --git a/server.js b/server.js index 1a2e2e47c7a916f1d0b86a54da2a7aedd69ae6d4..02758505e0a8e593bbc9a95cc6460cf31e903bae 100644 --- a/server.js +++ b/server.js @@ -151,12 +151,29 @@ } }) + app.get('/collections/:collectionsId/:containerId', function (req, res) { + try { + var collection_json = require(`./3DGeoVolumes/collections/${req.params.collectionsId}/${req.params.containerId}/${req.params.containerId}.json`) + res.json(collection_json); + } catch (error) { + res.send("internal error at /3DGeoVolumes/collections/:collectionsId/:containerId") + } + }) + + // app.get('/collections/Stuttgart_LOD2_Stadtmitte/3dtiles', function (req, res) { + // res.redirect("http://193.196.37.89:8092/AssetsHFT/3DTile_Stuttgart_City_LoD2_InnenStadt_ClampToGround/tileset.json") + // }) + // request 3D Tiles app.get('/collections/:collectionsId/3dtiles', function (req, res) { try { - var collections_3dtiles_json = require(`./3DGeoVolumes/collections/${req.params.collectionsId}/3dtiles/tileset.json`) - var collections_3dtiles_output = replace_server_url(collections_3dtiles_json) - res.json(collections_3dtiles_output); + if (req.params.collectionsId == "Stuttgart_LOD2_Stadtmitte") { + res.redirect("http://193.196.37.89:8092/AssetsHFT/3DTile_Stuttgart_City_LoD2_InnenStadt_ClampToGround/tileset.json") + } else { + var collections_3dtiles_json = require(`./3DGeoVolumes/collections/${req.params.collectionsId}/3dtiles/tileset.json`) + var collections_3dtiles_output = replace_server_url(collections_3dtiles_json) + res.json(collections_3dtiles_output); + } } catch (error) { res.send("internal error at /3DGeoVolumes/collections/:collectionsId/3dtiles") } @@ -166,7 +183,8 @@ app.get('/collections/NewYork/i3s', function (req, res) { res.redirect("https://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_NewYork_17/SceneServer/layers/0/") }) - + + app.get('/i3s', function (req, res) { if (req.query.i3s_resource_url) { res.render('arcgisclient.ejs', diff --git a/views/geovolumes/collections.ejs b/views/geovolumes/collections.ejs index bab83724ee4929a2e5aac7f2e9830f33e73794b6..3ce9522953cd9684a414eaed5b37f5afa318ae41 100644 --- a/views/geovolumes/collections.ejs +++ b/views/geovolumes/collections.ejs @@ -29,9 +29,8 @@ <h3> <img src="https://steinbeis-3dps.eu/images/stw-stuttgart.jpg" alt="" width="50px"> - <img src="https://transfer.hft-stuttgart.de/pages/buildicipate/webpage/assets/images/hft_logo.svg" - alt="" width="50px"> - STT GeoVolumes Server + + Demo GeoVolumes Server </h3> </a> </div>