@ud-viz/widget_workspace
v4.6.0
Published
widget workspace of the itowns framework
Downloads
73
Readme
@ud-viz/widget_workspace
The @ud-viz/widget_workspace
package provides a versatile workspace widget for managing and organizing various visualization components within a web application.
Workspace Module
The Workspace Module is an extension of the SPARQL Module that adds functionality to query and visualize Workspace, and CityGML Versioning data stored in an RDF Triple-store from a UD-Viz interface.
See the SPARQL module for more documentation on generic SPARQL functions.
Also check out the WorkspaceWidget example to see how this module can be implemented.
Workspace functionalities
This module extends the functionality of the SPARQL module with the ability to search for nodes corresponding to Versions, VersionTransitions, and Scenarios based on different criteria. The following functions are proposed (please read the Workspace widget JSDOC comments for more information):
- getVersionScenarioByIndex
- getVersionTransitionScenarioByIndex
- getVersionScenarioByUri
- getVersionTransitionScenarioByUri
- getScenarioLayerNameByIndex
- getScenarioLayerNameByUri
- getBitemporalTimestampsByIndex
D3 event customization
The intended use of the workspace module is to allow an application to update the 3D scene using information from a workspace dataset.
For example, the displayed 3D model can be updated by clicking on Version and VersionTransition nodes in the D3 graph. These nodes are created from Workspace and Versioning graph data from a SPARQL backend service. If a VersionTransition is selected and highlight changes between the related versions of the 3D city model will be highlighted using the Temporal module (see the following section for more information on how this data is structured).
Check out the WorkspaceWidget example to see how these events can be customized.
Data requirements
Note that for this functionality to work RDF data in the SPARQL endpoint must be conformant to the ontologies proposed here:
Additionally, the 3DTiles conforming to the 3DTILES_temporal
extension can be used to visualize the 3D model(s) supported by the Temporal module.
If the data in the batch table extension of the 3DTileset is interoperable with the data stored in the RDF triple-store these data can be used together to visualize scenarios of urban evolution.
For an example of how to the SPARQL Widget extension with the Temporal module, see the Workspace Widget example
Setup
To configure the SPARQL workspace module extension
Usage
Clicking on a Version or VersionTransition will adjust the 3D scene to display the appropriate 3D city model.
Installation
You can install the package via npm:
npm install @ud-viz/widget_workspace
Usage
Features:
- Customizable Layouts: Arrange visualization components in flexible layouts.
- Component Management: Add, remove, and reposition components within the workspace.
- Interactivity: Configure components to respond to user interactions.
- Persistence: Save and load workspace configurations.
Implementation:
import { Workspace } from '@ud-viz/widget_workspace';
// Initialize the Workspace widget
const workspace = new Workspace();
// Add visualization components to the workspace
workspace.addComponent(component1);
workspace.addComponent(component2);
// Customize the layout of components
workspace.setLayout('grid');
// Save the current workspace configuration
const savedConfig = workspace.saveConfiguration();
// Load a saved workspace configuration
workspace.loadConfiguration(savedConfig);
// Add the Workspace widget to a parent element
document.getElementById('parentElementId').appendChild(workspace.domElement);
Documentation
Contributing
Contributions are welcome! Feel free to submit bug reports, feature requests, or pull requests on the GitHub repository. See Contributing.md.
License
This package is licensed under the GNU Lesser General Public License Version 2.1, with copyright attributed to the University of Lyon.
Credits
@ud-viz/widget_workspace
is developed and maintained by VCityTeam. See Contributors.md.