From 1902e962a896397b340065f76c6ae0d76939b5c1 Mon Sep 17 00:00:00 2001 From: mahmoudadel54 Date: Mon, 23 Oct 2023 10:12:58 +0300 Subject: [PATCH] resolve review comments description: write unit test for add recordsfor 3d tile layers --- web/client/api/CSW.js | 90 +- web/client/api/__tests__/CSW-test.js | 111 +- .../3dtiles/tileSetSample2.json | 1286 +++++++++++++++++ .../csw/getRecordsResponseDCWith3DLayers.xml | 100 ++ 4 files changed, 1549 insertions(+), 38 deletions(-) create mode 100644 web/client/test-resources/3dtiles/tileSetSample2.json create mode 100644 web/client/test-resources/csw/getRecordsResponseDCWith3DLayers.xml diff --git a/web/client/api/CSW.js b/web/client/api/CSW.js index 346b5be10c..22b3cf7888 100644 --- a/web/client/api/CSW.js +++ b/web/client/api/CSW.js @@ -19,11 +19,11 @@ import { THREE_D_TILES, getCapabilities } from './ThreeDTiles'; const parseUrl = (url) => { const parsed = urlUtil.parse(url, true); - return urlUtil.format(assign({}, parsed, {search: null}, { + return urlUtil.format(assign({}, parsed, { search: null }, { query: assign({ service: "CSW", version: "2.0.2" - }, parsed.query, {request: undefined}) + }, parsed.query, { request: undefined }) })); }; @@ -74,13 +74,13 @@ export const cswGetRecordsXml = ' { return result; } const { value: _url } = _dcRef?.find(t => - REGEX_WMS_ALL.some(regex=> t?.scheme?.match(regex) || t?.protocol?.match(regex))) || {}; // Get WMS URL from references + REGEX_WMS_ALL.some(regex => t?.scheme?.match(regex) || t?.protocol?.match(regex))) || {}; // Get WMS URL from references const [parsedUrl] = _url && _url.split('?') || []; - if (!parsedUrl) return {...result}; // Return record when no url found + if (!parsedUrl) return { ...result }; // Return record when no url found const cached = capabilitiesCache[parsedUrl]; const isCached = !isEmpty(cached); @@ -208,8 +208,8 @@ const addCapabilitiesToRecords = (_dcRef, result, options) => { isCached ? cached : WMS.getCapabilities(parsedUrl + '?version=') - .then((caps)=> WMS.flatLayers(caps.Capability)) - .catch(()=> [])) + .then((caps) => WMS.flatLayers(caps.Capability)) + .catch(() => [])) .then((layers) => { if (!isCached) { capabilitiesCache[parsedUrl] = layers; @@ -217,22 +217,48 @@ const addCapabilitiesToRecords = (_dcRef, result, options) => { // Add visibility limits scale data of the layer to the record return { ...result, - records: result?.records?.map(record=> { + records: result?.records?.map(record => { const name = get(getLayerReferenceFromDc(record?.dc, null, false), 'params.name', ''); const { MinScaleDenominator, MaxScaleDenominator - } = layers.find(l=> l.Name === name) || {}; + } = layers.find(l => l.Name === name) || {}; return { ...record, ...((!isNil(MinScaleDenominator) || !isNil(MaxScaleDenominator)) - && {capabilities: {MaxScaleDenominator, MinScaleDenominator}}) + && { capabilities: { MaxScaleDenominator, MinScaleDenominator } }) }; }) }; }); }; - +/** + * handle getting bbox from capabilities in case of 3D tile layer for CSW records + * @param {object} result csw results object + * @return {object} csw records + */ +const getBboxFor3DLayersToRecords = async(result)=> { + if (!result) return result; + let { records } = result; + if (records?.length) { + let records3D = records.filter(rec=>rec?.dc?.format === THREE_D_TILES); + let records3DPromisesForCapabilities = records3D.map(rec=>{ + let tilesetJsonURL = rec.dc?.URI?.value; + return getCapabilities(tilesetJsonURL); + }); + if (!records3DPromisesForCapabilities.length) return result; + let res = await Promise.all(records3DPromisesForCapabilities); + res.forEach((recCapabilities, idx)=>{ + let bbox = getExtentFromNormalized(recCapabilities.bbox.bounds, recCapabilities.bbox.crs); + records3D[idx].boundingBox = { + extent: bbox.extent, + crs: recCapabilities.bbox.crs + }; + }); + return result; + } + return result; +}; /** * API for local config */ @@ -244,7 +270,7 @@ const Api = { resolve(axios.get(catalogURL) .then((response) => { if (response) { - const {unmarshaller} = require('../utils/ogc/CSW'); + const { unmarshaller } = require('../utils/ogc/CSW'); const json = unmarshaller.unmarshalString(response.data); if (json && json.name && json.name.localPart === "GetRecordByIdResponse" && json.value && json.value.abstractRecord) { let dcElement = json.value.abstractRecord[0].value.dcElement; @@ -277,7 +303,7 @@ const Api = { dc[elName] = finalEl; } } - return {dc}; + return { dc }; } } else if (json && json.name && json.name.localPart === "ExceptionReport") { return { @@ -294,7 +320,7 @@ const Api = { getRecords: function(url, startPosition, maxRecords, filter, options) { return new Promise((resolve) => { require.ensure(['../utils/ogc/CSW', '../utils/ogc/Filter'], () => { - const {CSW, marshaller, unmarshaller } = require('../utils/ogc/CSW'); + const { CSW, marshaller, unmarshaller } = require('../utils/ogc/CSW'); let body = marshaller.marshalString({ name: "csw:GetRecords", value: CSW.getRecords(startPosition, maxRecords, typeof filter !== "string" && filter) @@ -302,9 +328,11 @@ const Api = { if (!filter || typeof filter === "string") { body = constructXMLBody(startPosition, maxRecords, filter, options); } - resolve(axios.post(parseUrl(url), body, { headers: { - 'Content-Type': 'application/xml' - }}).then(async(response) => { + resolve(axios.post(parseUrl(url), body, { + headers: { + 'Content-Type': 'application/xml' + } + }).then((response) => { if (response) { let json = unmarshaller.unmarshalString(response.data); if (json && json.name && json.name.localPart === "GetRecordsResponse" && json.value && json.value.searchResults) { @@ -409,18 +437,6 @@ const Api = { } obj.dc = dc; } - // if it is 3D layer ---> get layer extent from tilesetJson - if (obj?.dc?.format === THREE_D_TILES) { - let tilesetJsonURL = obj.dc?.URI?.value; - if (tilesetJsonURL) { - let data = await getCapabilities(tilesetJsonURL); - let bbox = getExtentFromNormalized(data.bbox.bounds, data.bbox.crs); - obj.boundingBox = { - extent: bbox.extent, - crs: data.bbox.crs - }; - } - } records.push(obj); } } @@ -433,7 +449,7 @@ const Api = { } } return null; - })); + }).then(results=>getBboxFor3DLayersToRecords(results))); // handle getting bbox from capabilities in case of 3D tile layer }); }); }, @@ -445,7 +461,7 @@ const Api = { workspaceSearch: function(url, startPosition, maxRecords, text, workspace) { return new Promise((resolve) => { require.ensure(['../utils/ogc/CSW', '../utils/ogc/Filter'], () => { - const {Filter} = require('../utils/ogc/Filter'); + const { Filter } = require('../utils/ogc/Filter'); const workspaceTerm = workspace || "%"; const layerNameTerm = text && "%" + text + "%" || "%"; const ops = Filter.propertyIsLike("dc:identifier", workspaceTerm + ":" + layerNameTerm); @@ -454,7 +470,7 @@ const Api = { }); }); }, - reset: () => {} + reset: () => { } }; export default Api; diff --git a/web/client/api/__tests__/CSW-test.js b/web/client/api/__tests__/CSW-test.js index abce7330bc..c501b91200 100644 --- a/web/client/api/__tests__/CSW-test.js +++ b/web/client/api/__tests__/CSW-test.js @@ -10,8 +10,10 @@ import expect from 'expect'; import axios from '../../libs/ajax'; import MockAdapter from 'axios-mock-adapter'; import GRDCResponse from 'raw-loader!../../test-resources/csw/getRecordsResponseDC.xml'; +import GRDCResponseWith3DLayers from 'raw-loader!../../test-resources/csw/getRecordsResponseDCWith3DLayers.xml'; +import API, {constructXMLBody, getLayerReferenceFromDc } from '../CSW'; -import API, {constructXMLBody, getLayerReferenceFromDc} from '../CSW'; +import tileSetResponse from '../../test-resources/3dtiles/tileSetSample2.json'; describe('Test correctness of the CSW APIs', () => { it('getRecords ISO Metadata Profile', (done) => { @@ -281,4 +283,111 @@ describe("getLayerReferenceFromDc", () => { expect(layerRef.type).toBe('arcgis'); expect(layerRef.url).toBe('http://esri_url'); }); + +}); + +describe("getLayerReferenceFromDc", () => { + const threeDLayerRecord = { + "boundingBox": { + "extent": [ + 11.244154369601063, + 43.75907090685874, + 11.265929832205956, + 43.78084636946362 + ], + "crs": "EPSG:4326" + }, + "dc": { + "references": [], + "identifier": "test:20230829_test_3dtile_01", + "date": "2023-09-22", + "title": "Metadato di test per 3D-tile", + "abstract": "Breve descrizione della risorsa", + "description": "Breve descrizione della risorsa", + "type": "dataset", + "subject": [ + "Zone a rischio naturale", + "health" + ], + "format": "3D Tiles", + "contributor": "Nome dell'ufficio responsabile del dato", + "rights": [ + "otherRestrictions", + "otherRestrictions" + ], + "language": "ita", + "source": "Descrizione della provenienza e del processo di produzione del dato (storia, ciclo di vita, rilevazione, acquisizione, forma attuale, qualità richiesta per garantirne l'interoperabilità)", + "temporal": "start=2009-01-01; end=2013-12-31", + "URI": { + "TYPE_NAME": "DC_1_1.URI", + "protocol": "https://registry.geodati.gov.it/metadata-codelist/ProtocolValue/www-download", + "description": "access point", + "value": "https://3d-layers.s3.eu-central-1.amazonaws.com/3dtiles/centro_storico_di_firenze_-_brass_city_model/tileset.json" + } + } + }; + let mockAxios; + beforeEach((done) => { + mockAxios = new MockAdapter(axios); + setTimeout(done); + }); + afterEach((done) => { + mockAxios.restore(); + setTimeout(done); + }); + it('test getBboxFor3DLayersToRecords function that handles getting bbox for 3D tile layers from ', (done) => { + mockAxios.onPost().replyOnce(()=>{ + return [200, GRDCResponseWith3DLayers]; + }); + mockAxios.onGet().reply(()=>{ + return [200, tileSetResponse]; + }); + mockAxios.onGet().reply(()=>{ + return [200, tileSetResponse]; + }); + API.getRecords('base/web/client/test-resources/csw/getRecordsResponseDCWith3DLayers.xml', 1, 2).then((result) => { + try { + expect(result).toExist(); + expect(result.records).toExist(); + expect(result.records.length).toBe(5); + const [rec0, rec1, rec2, rec3, rec4] = result.records; + + expect(rec0.dc).toExist(); + expect(rec0.boundingBox).toExist(); + expect(rec0.boundingBox.crs).toBe('EPSG:4326'); + expect(rec0.boundingBox.extent).toEqual([45.542, 11.874, 46.026, 12.718]); + expect(rec1.dc.format).toEqual("3D Tiles"); + expect(rec1.boundingBox).toExist(); + expect(rec1.boundingBox.crs).toBe('EPSG:4326'); + expect(rec1.boundingBox.extent[0]).toEqual(threeDLayerRecord.boundingBox.extent[0]); + expect(rec1.boundingBox.extent[1]).toEqual(threeDLayerRecord.boundingBox.extent[1]); + expect(rec1.boundingBox.extent[2]).toEqual(threeDLayerRecord.boundingBox.extent[2]); + expect(rec1.boundingBox.extent[3]).toEqual(threeDLayerRecord.boundingBox.extent[3]); + expect(rec2.dc.URI).toExist(); + expect(rec2.dc.URI[0]).toExist(); + const uri = rec2.dc.URI[0]; + expect(uri.name).toExist(); + expect(uri.value).toExist(); + expect(uri.description).toExist(); + expect(rec2.boundingBox).toExist(); + expect(rec2.boundingBox.crs).toBe('EPSG:4326'); + expect(rec2.boundingBox.extent).toEqual([ 12.002717999999996, 45.760718, 12.429282000000002, 46.187282]); + expect(rec3.boundingBox).toExist(); + expect(rec3.boundingBox.crs).toBe('EPSG:4326'); + expect(rec3.boundingBox.extent).toEqual([ -4.14168, 47.93257, -4.1149, 47.959353362144 ]); + expect(rec4.dc.format).toEqual("3D Tiles"); + expect(rec4.boundingBox).toExist(); + expect(rec4.boundingBox.crs).toBe('EPSG:4326'); + expect(rec4.boundingBox.extent[0]).toEqual(threeDLayerRecord.boundingBox.extent[0]); + expect(rec4.boundingBox.extent[1]).toEqual(threeDLayerRecord.boundingBox.extent[1]); + expect(rec4.boundingBox.extent[2]).toEqual(threeDLayerRecord.boundingBox.extent[2]); + expect(rec4.boundingBox.extent[3]).toEqual(threeDLayerRecord.boundingBox.extent[3]); + done(); + } catch (ex) { + done(ex); + } + }); + done(); + + }); }); diff --git a/web/client/test-resources/3dtiles/tileSetSample2.json b/web/client/test-resources/3dtiles/tileSetSample2.json new file mode 100644 index 0000000000..f66c8a7071 --- /dev/null +++ b/web/client/test-resources/3dtiles/tileSetSample2.json @@ -0,0 +1,1286 @@ +{ + "asset": { + "version": "1.0", + "extras": { + "cesium":{ + "credits": [{ + "html": "'CENTRO STORICO DI FIRENZE - BRASS CITY MODEL' (https://skfb.ly/ozsuX) by Blayne Jackson is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/)." + }] + } + } + }, + "geometricError": 100.0, + "root": { + "transform": [ + -0.19518643826956167, + 0.9807661567956159, + 0.0, + 0.0, + -0.7081936612571651, + -0.14094062829155365, + -0.6918073991017686, + 0.0, + -0.6785012840598124, + -0.13503142219920336, + 0.7220820746619087, + 0.0, + 4524243.58964167, + 900388.9316605763, + 4389975.148663257, + 1.0 + ], + "boundingVolume": { + "box": [ + -46.12789900000001, + -45.779855500000004, + -376.9231565, + 887.7269590000001, + 0.0, + 0.0, + 0.0, + -92.34474750000001, + 0.0, + 0.0, + 0.0, + 817.9918825 + ] + }, + "geometricError": 100.0, + "refine": "ADD", + "content": null, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 419.85219192144916, + 4.095745422540702, + 42.213073407500616, + 22.116611421449136, + 0.0, + 0.0, + 0.0, + -20.506155663600108, + 0.0, + 0.0, + 0.0, + 10.140288657500601 + ] + }, + "geometricError": 9.250805133486388, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XR-YR-XR-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 420.6972960044431, + 4.178090504776833, + 42.213073407500616, + 22.961715504443077, + 0.0, + 0.0, + 0.0, + -20.481441743868658, + 0.0, + 0.0, + 0.0, + 10.140288657500601 + ] + }, + "geometricError": 3.0044851085938626, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XR-YR-XR-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 420.7135110832271, + 4.093270917621091, + 42.213073407500616, + 22.97793058322705, + 0.0, + 0.0, + 0.0, + -20.558839672437735, + 0.0, + 0.0, + 0.0, + 10.140288657500601 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XR-YR-XR-YR.b3dm" + }, + "children": [] + } + ] + } + ] + }, + { + "transform": null, + "boundingVolume": { + "box": [ + 175.80384075, + 1.820949500000001, + 143.62393773310916, + 221.93173975000002, + 0.0, + 0.0, + 0.0, + -24.0937825, + 0.0, + 0.0, + 0.0, + 111.55115298310915 + ] + }, + "geometricError": 9.009745481719476, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XR-YR-XL-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 175.80384075, + 1.820949500000001, + 143.81010388335957, + 221.93173975000002, + 0.0, + 0.0, + 0.0, + -24.0937825, + 0.0, + 0.0, + 0.0, + 111.73731913335956 + ] + }, + "geometricError": 3.0000450033348196, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XR-YR-XL-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 175.80384075, + 1.820949500000001, + 143.80507533137478, + 221.93173975000002, + 0.0, + 0.0, + 0.0, + -24.0937825, + 0.0, + 0.0, + 0.0, + 111.73229058137476 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XR-YR-XL-YR.b3dm" + }, + "children": [] + } + ] + } + ] + }, + { + "transform": null, + "boundingVolume": { + "box": [ + 619.66732025, + 13.9466365, + -172.425185875, + 221.93173975, + 0.0, + 0.0, + 0.0, + -32.618255500000004, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 9.000419677857408, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XR-YR-XR-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 619.66732025, + 13.9466365, + -172.425185875, + 221.93173975, + 0.0, + 0.0, + 0.0, + -32.618255500000004, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 3.0000699454941726, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XR-YR-XR-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 619.66732025, + 13.944355, + -172.425185875, + 221.93173975, + 0.0, + 0.0, + 0.0, + -32.620537, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XR-YR-XR-YL.b3dm" + }, + "children": [] + } + ] + } + ] + }, + { + "transform": null, + "boundingVolume": { + "box": [ + 175.80384075, + -57.392518115365164, + -172.425185875, + 221.93173975000002, + 0.0, + 0.0, + 0.0, + -80.64890411536516, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 9.00309444695593, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XR-YR-XL-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 175.80384075, + -57.43410850000001, + -172.425185875, + 221.93173975000002, + 0.0, + 0.0, + 0.0, + -80.6904945, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 3.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XR-YR-XL-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 175.80384075, + -57.43410850000001, + -172.425185875, + 221.93173975000002, + 0.0, + 0.0, + 0.0, + -80.6904945, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XR-YR-XL-YL.b3dm" + }, + "children": [] + } + ] + } + ] + }, + { + "transform": null, + "boundingVolume": { + "box": [ + -268.05963875, + -27.100245277938605, + 236.57075537500003, + 221.93173975, + 0.0, + 0.0, + 0.0, + -50.57774872206139, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 9.007984542748456, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XL-YR-XR-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -268.05963875, + -27.100245277938605, + 236.57075537500003, + 221.93173975, + 0.0, + 0.0, + 0.0, + -50.57774872206139, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 3.0013304621031747, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XL-YR-XR-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -268.05963875, + -27.032953499999998, + 236.57075537500003, + 221.93173975, + 0.0, + 0.0, + 0.0, + -50.6450405, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XL-YR-XR-YR.b3dm" + }, + "children": [] + } + ] + } + ] + }, + { + "transform": null, + "boundingVolume": { + "box": [ + -571.4786864988677, + -28.829253992945397, + 206.02029611656252, + 81.48730799886766, + 0.0, + 0.0, + 0.0, + -59.572296007054604, + 0.0, + 0.0, + 0.0, + 173.94751136656248 + ] + }, + "geometricError": 9.024395503911954, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XL-YR-XL-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -571.4786864988677, + -28.829253992945397, + 206.30275865898983, + 81.48730799886766, + 0.0, + 0.0, + 0.0, + -59.572296007054604, + 0.0, + 0.0, + 0.0, + 174.2299739089898 + ] + }, + "geometricError": 3.002857224933117, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XL-YR-XL-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -571.4786864988677, + -28.987028000000002, + 206.26638310502358, + 81.48730799886766, + 0.0, + 0.0, + 0.0, + -59.414522, + 0.0, + 0.0, + 0.0, + 174.1935983550236 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XL-YR-XL-YR.b3dm" + }, + "children": [] + } + ] + } + ] + }, + { + "transform": null, + "boundingVolume": { + "box": [ + -268.05963875, + -12.949604532282189, + -172.425185875, + 221.93173975, + 0.0, + 0.0, + 0.0, + -31.37277253228219, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 9.06715492705682, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XL-YR-XR-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -268.05963875, + -13.158411494229224, + -172.425185875, + 221.93173975, + 0.0, + 0.0, + 0.0, + -31.723042135653397, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 3.000006846244177, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XL-YR-XR-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -268.05963875, + -13.257099319345885, + -172.425185875, + 221.93173975, + 0.0, + 0.0, + 0.0, + -31.723259319345885, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XL-YR-XR-YL.b3dm" + }, + "children": [] + } + ] + } + ] + }, + { + "transform": null, + "boundingVolume": { + "box": [ + -661.22945751898, + 6.100170523205582, + -172.425185875, + 171.23807901898, + 0.0, + 0.0, + 0.0, + -32.022994476794416, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 9.091012569601437, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XL-YR-XL-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -661.4706318493029, + 5.747224965764039, + -172.425185875, + 171.47925334930284, + 0.0, + 0.0, + 0.0, + -32.37594003423596, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 3.002785511456154, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XL-YR-XL-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -661.46077725, + 5.658901999999999, + -172.425185875, + 171.46939874999998, + 0.0, + 0.0, + 0.0, + -32.464263, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XL-YR-XL-YL.b3dm" + }, + "children": [] + } + ] + } + ] + }, + { + "transform": null, + "boundingVolume": { + "box": [ + 568.4202192500001, + -20.583627999999997, + -581.421127125, + 170.68463875, + 0.0, + 0.0, + 0.0, + -58.508108, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 9.045561832193199, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XR-YL-XR-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 568.64925375, + -20.583627999999997, + -581.421127125, + 170.91367324999996, + 0.0, + 0.0, + 0.0, + -58.508108, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 3.0062421946715485, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XR-YL-XR-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 568.64925375, + -20.948847, + -581.421127125, + 170.91367324999996, + 0.0, + 0.0, + 0.0, + -58.873327, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XR-YL-XR-YR.b3dm" + }, + "children": [] + } + ] + } + ] + }, + { + "transform": null, + "boundingVolume": { + "box": [ + 175.80384075, + -40.4709845, + -581.421127125, + 221.93173975000002, + 0.0, + 0.0, + 0.0, + -70.7598965, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 9.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XR-YL-XL-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 175.80384075, + -40.4709845, + -581.421127125, + 221.93173975000002, + 0.0, + 0.0, + 0.0, + -70.7598965, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 3.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XR-YL-XL-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 175.80384075, + -40.4709845, + -581.421127125, + 221.93173975000002, + 0.0, + 0.0, + 0.0, + -70.7598965, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XR-YL-XL-YR.b3dm" + }, + "children": [] + } + ] + } + ] + }, + { + "transform": null, + "boundingVolume": { + "box": [ + 474.01867281378895, + 13.884999124593019, + -952.6590779651754, + 76.28309231378896, + 0.0, + 0.0, + 0.0, + -21.413729875406982, + 0.0, + 0.0, + 0.0, + 166.73998021517536 + ] + }, + "geometricError": 9.035181333117173, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XR-YL-XR-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 474.01867281378895, + 13.784376000000002, + -952.6590779651754, + 76.28309231378896, + 0.0, + 0.0, + 0.0, + -21.514353, + 0.0, + 0.0, + 0.0, + 166.73998021517536 + ] + }, + "geometricError": 3.001158836108843, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XR-YL-XR-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 474.01867281378895, + 13.784376000000002, + -952.8523022750364, + 76.28309231378896, + 0.0, + 0.0, + 0.0, + -21.514353, + 0.0, + 0.0, + 0.0, + 166.93320452503644 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XR-YL-XR-YL.b3dm" + }, + "children": [] + } + ] + } + ] + }, + { + "transform": null, + "boundingVolume": { + "box": [ + 175.80384075, + 12.857098, + -990.417068375, + 221.93173975000002, + 0.0, + 0.0, + 0.0, + -21.532020000000003, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 9.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XR-YL-XL-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 175.80384075, + 12.857098, + -990.417068375, + 221.93173975000002, + 0.0, + 0.0, + 0.0, + -21.532020000000003, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 3.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XR-YL-XL-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + 175.80384075, + 12.857098, + -990.417068375, + 221.93173975000002, + 0.0, + 0.0, + 0.0, + -21.532020000000003, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XR-YL-XL-YL.b3dm" + }, + "children": [] + } + ] + } + ] + }, + { + "transform": null, + "boundingVolume": { + "box": [ + -268.05963875, + -0.24298320162245446, + -581.421127125, + 221.93173975, + 0.0, + 0.0, + 0.0, + -29.475140798377545, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 9.050170085022257, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XL-YL-XR-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -268.05963875, + -0.04077669028951547, + -581.421127125, + 221.93173975, + 0.0, + 0.0, + 0.0, + -29.677347309710484, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 3.0014796703300752, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XL-YL-XR-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -268.05963875, + 0.0020330000000008397, + -581.421127125, + 221.93173975, + 0.0, + 0.0, + 0.0, + -29.72126, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XL-YL-XR-YR.b3dm" + }, + "children": [] + } + ] + } + ] + }, + { + "transform": null, + "boundingVolume": { + "box": [ + -711.92311825, + 14.111128606047746, + -581.421127125, + 221.93173975000002, + 0.0, + 0.0, + 0.0, + -26.256765267608944, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 9.062620376021641, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XL-YL-XL-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -711.92311825, + 14.160693436828346, + -581.421127125, + 221.93173975000002, + 0.0, + 0.0, + 0.0, + -26.207200436828344, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 3.01232961009897, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XL-YL-XL-YR.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -711.92311825, + 14.243437, + -581.421127125, + 221.93173975000002, + 0.0, + 0.0, + 0.0, + -26.530324999999998, + 0.0, + 0.0, + 0.0, + 204.497970625 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XL-YL-XL-YR.b3dm" + }, + "children": [] + } + ] + } + ] + }, + { + "transform": null, + "boundingVolume": { + "box": [ + -268.05963875, + 14.376728000000002, + -900.2939233462467, + 221.93173975, + 0.0, + 0.0, + 0.0, + -22.692677000000003, + 0.0, + 0.0, + 0.0, + 114.37482559624675 + ] + }, + "geometricError": 9.023518079997174, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XL-YL-XR-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -268.05963875, + 14.465618000000001, + -900.2939233462467, + 221.93173975, + 0.0, + 0.0, + 0.0, + -22.781567000000003, + 0.0, + 0.0, + 0.0, + 114.37482559624675 + ] + }, + "geometricError": 3.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XL-YL-XR-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -268.05963875, + 14.465618000000001, + -900.2939233462467, + 221.93173975, + 0.0, + 0.0, + 0.0, + -22.781567000000003, + 0.0, + 0.0, + 0.0, + 114.37482559624675 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XL-YL-XR-YL.b3dm" + }, + "children": [] + } + ] + } + ] + }, + { + "transform": null, + "boundingVolume": { + "box": [ + -519.655372386611, + 28.868679, + -800.1277477470123, + 29.663993886611024, + 0.0, + 0.0, + 0.0, + -7.142448000000002, + 0.0, + 0.0, + 0.0, + 14.208649997012344 + ] + }, + "geometricError": 9.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-2/Mesh-XL-YL-XL-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -519.655372386611, + 28.868679, + -800.1277477470123, + 29.663993886611024, + 0.0, + 0.0, + 0.0, + -7.142448000000002, + 0.0, + 0.0, + 0.0, + 14.208649997012344 + ] + }, + "geometricError": 3.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-1/Mesh-XL-YL-XL-YL.b3dm" + }, + "children": [ + { + "transform": null, + "boundingVolume": { + "box": [ + -519.655372386611, + 28.868679, + -800.1277477470123, + 29.663993886611024, + 0.0, + 0.0, + 0.0, + -7.142448000000002, + 0.0, + 0.0, + 0.0, + 14.208649997012344 + ] + }, + "geometricError": 0.0, + "refine": "REPLACE", + "content": { + "uri": "LOD-0/Mesh-XL-YL-XL-YL.b3dm" + }, + "children": [] + } + ] + } + ] + } + ] + } + } \ No newline at end of file diff --git a/web/client/test-resources/csw/getRecordsResponseDCWith3DLayers.xml b/web/client/test-resources/csw/getRecordsResponseDCWith3DLayers.xml new file mode 100644 index 0000000000..8d7635f66a --- /dev/null +++ b/web/client/test-resources/csw/getRecordsResponseDCWith3DLayers.xml @@ -0,0 +1,100 @@ + + + + + c1020047_title + dataset + sub1, sub2, sub3 + sub4 + + Abstract + + + + base/web/client/test-resources/csw/getCapability.xml + workspace:layer_name1 + + 12.718 45.542 + 11.874 46.026 + + + + test:20230829_test_3dtile_01 + 2023-09-22 + Metadato di test per 3D-tile + Breve descrizione della risorsa + Breve descrizione della risorsa + dataset + Zone a rischio naturale + health + 3D Tiles + Nome dell'ufficio responsabile del dato + otherRestrictions + otherRestrictions + ita + Descrizione della provenienza e del processo di produzione del dato (storia, ciclo di vita, rilevazione, acquisizione, forma attuale, qualità richiesta per garantirne l'interoperabilità) + + 11.331132423112592 43.72700677229733 + 11.154076443108027 43.82471910604458 + + start=2009-01-01; end=2013-12-31 + https://server.org/name/tileset.json + + + d698f693-6e7e-47a9-a138-918068d0b082 + Title2 + dataset + geoscientificInformation + + + + + + + 12.002717999999996 46.187282 + 12.429282000000002 45.760718 + + http://ows.domain.it:80/geoserver/wms?SERVICE=WMS& + resources.get?id=187049&fname=d698f693-6e7e-47a9-a138-918068d0b082_s.png&access=public + + + urn:isogeo:metadata:uuid:01ca64b3-6d69-43b7-b953-7743e11daafe + Title3 + dataset + infoMapAccessService + + + + + + + -4.1149 47.93257 + -4.14168 47.959353362144 + + http://ows.domain.it:80/geoserver/wms?SERVICE=WMS& + http://geowww.agrocampus-ouest.fr/img/metadata/KBZ.png + + + test:20230829_test_3dtile_01 + 2023-09-22 + Metadato di test per 3D-tile + Breve descrizione della risorsa + Breve descrizione della risorsa + dataset + Zone a rischio naturale + health + 3D Tiles + Nome dell'ufficio responsabile del dato + otherRestrictions + otherRestrictions + ita + Descrizione della provenienza e del processo di produzione del dato (storia, ciclo di vita, rilevazione, acquisizione, forma attuale, qualità richiesta per garantirne l'interoperabilità) + + 11.331132423112592 43.72700677229733 + 11.154076443108027 43.82471910604458 + + start=2009-01-01; end=2013-12-31 + https://server.org/name/tileset.json + + +