4.2 Using a Map Visualization

Spatial Studio supports several types of map visualizations.

The following types of map visualizations are supported:

  • Geometry Data Visualization:
    • Point type
    • Line type
    • Polygon / Area type
  • GeoRaster Data Visualization
  • Hexagonal Data Visualization using H3 Aggregations

The following sections describe how to get started on these visualizations:

4.2.1 Visualizing a Point Map

Spatial Studio allows you to visualize the location of geographic data as points on maps.
To display your geographic data as maps, you must perform the following steps.
The instructions assume that the dataset for visualization is already added to the project in the Active Project page.
  1. Click the Visualizations tab on the left pane in the Active Project page.
    This lists the various visualization options.
  2. Click and drag Map from the list to the visualization window on the right to create a map visualization.
    A default base map is displayed with no data visualization layers.
  3. Click the Data tab on the left pane in the Active Project page.
    This lists all the Datasets that are loaded for the project.
  4. Click and drag the desired dataset from the list to the map view on the right.

    Tip:

    You can drag and drop multiple datasets in a single action to your map view.
    The map layer displays the data points for visualization.
  5. Optionally, you can click Settings in the map tool bar and enable Show minimap in the Visualization Settings dialog.

    An inset map showing the overview of the main map is displayed as shown in the preceding figure.

    See Also:

    Applying a Render Style For a Point Layer to render your map using different rendering styles.

4.2.2 About GeoRaster Data Visualization

Oracle Spatial Studio allows you to visualize GeoRaster data stored in spatial GeoRaster type in Oracle Database.

Geo-referenced raster data, including satellite imagery, aerial photos from drones, and gridded data, is very useful for mapping applications. It can be directly analyzed, or layered with vector data as a background map for additional context. See Spatial GeoRaster Developer's Guide for more information on GeoRaster data.

4.2.2.1 Visualizing GeoRaster Data on a Map

You can visualize georaster data on a map using the following steps.
The instructions assume that the GeoRaster dataset is already added to the project in the Active Project page. To create a GeoRaster dataset, see Creating a GeoRaster Dataset for more information.
  1. Click the Visualizations tab on the left pane in the Active Project page.
    This lists the various visualization options.
  2. Click and drag Map from the list to the visualization window on the right to create a map visualization.
    A default base map is displayed with no data visualization layers.
  3. Click the Data tab on the left pane in the Active Project page.
    This lists all the Datasets that are loaded for the project.
  4. Click and drag the desired GeoRaster dataset from the list to the map view on the right.
    A GeoRaster layer is created on the map as shown:

    Figure 4-5 GeoRaster Data Visualization

    Description of Figure 4-5 follows
    Description of "Figure 4-5 GeoRaster Data Visualization"

    You can delete the map visualization by clicking the X icon on the top right.

    Tip:

    You can enhance your visual display by modifying your Layer Settings using the Style tab and Raster tab. See Applying Style for a GeoRaster Layer for more information.

4.2.3 About Hexagonal Data Visualization Using H3 Aggregations

Oracle Spatial Studio allows you to visualize point-type map data using hexagons with H3 (Hexagonal Hierarchical Spatial Index) aggregations.

Visualizing your map data as hexagons has several advantages:
  • It helps you to identify patterns or clusters in a larger point dataset
  • Easier interpretation of data, as in a hexagonal cell, all the points are equidistant from the hexagon center-point
  • Hexagonal cells are color coded based on the number of datapoints they hold, which enables you to easily understand data patterns

The following sections describe how you can use H3 aggregations in Spatial Studio:

4.2.3.1 Preparing an H3 Aggregation Dataset

You can prepare an H3 aggregation dataset by performing the following steps.
The instructions assume that a dataset containing geometric data columns is already loaded to Spatial Studio.
  1. Navigate to the Datasets page.
    All the datasets loaded to Spatial Studio are shown listed on this page.
  2. Select the required dataset name and right-click to open the context menu.
  3. Click Create H3 Index on the Prepare submenu.
    The Creating H3 Index dialog opens as shown:

    Figure 4-6 Creating an H3 Aggregation Dataset

    Description of Figure 4-6 follows
    Description of "Figure 4-6 Creating an H3 Aggregation Dataset"
  4. Select the Geometry Column for H3 aggregations.
  5. Click a Summarize using option.
    The values for summarizing are:
    • Count: buckets the number of datapoints in each hexagon
    • Sum: adds up the values for a specific column in the data set, for all the points that fall in a specific hexagon
  6. Select the Column to sum, if you have chosen Sum to summarize your dataset. Otherwise, you can skip this step.
  7. Optionally, modify the H3 Index Name.
  8. Click OK.
    An H3 aggregation dataset is created and added as a new row in the Datasets page.

4.2.3.2 Visualizing Data With H3 Aggregations

To visualize your map data with H3 aggregations, you must perform the following steps.
The instructions assume that an H3 aggregation dataset is already added to the project in the Active Project page.

To prepare a dataset for H3 aggregation, see Preparing an H3 Aggregation Dataset for more information.

  1. Click the Visualizations tab on the left pane in the Active Project page.
    This lists the various visualization options.
  2. Click and drag Map from the list to the visualization window on the right to create a map visualization.
    A default base map is displayed with no data visualization layers.
  3. Click the Data tab on the left pane in the Active Project page.
    This lists all the Datasets that are loaded for the project.
  4. Click and drag the desired H3 Aggregation dataset from the list to the map view on the right.
    A layer showing the hexagonal binning of the data points is displayed on the map as shown:

    Figure 4-7 Map Data Visualization Using Hexagonal Binning

    Description of Figure 4-7 follows
    Description of "Figure 4-7 Map Data Visualization Using Hexagonal Binning"

    See Applying Data-Driven Style to a Map with H3 Aggregations for more information on applying styling for a H3 map layer.

4.2.4 About Custom Map Regions Visualization

Oracle Spatial Studio allows you to create custom map regions on map layers that support polygon type geometry.

You can create a new map region by selecting multiple polygon shapes and combining them with a new key-value. You can then append or insert this new map region with the new key-value into a target dataset containing all of your other custom map regions, or save it as a new dataset.

These newly created custom shapes are persisted on the underlying database table of the target dataset, and therefore can be used for data visualization or reporting just like any other dataset.

The following are the main characteristics for this feature support:
  • The source dataset, that is the dataset whose polygon shapes you will be selecting and then combining into a custom map region, must always be based on an Oracle Database table.

    Datasets from Oracle views and Studio's Analyses are not currently supported.

  • The new regions may or may not be contiguous.
  • The target dataset, that is the dataset on which you want to store the newly created custom map regions, will store them in its geo-reference system.
  • The target dataset can be a new dataset or an existing dataset in the current project. For a new dataset, you need to specify the connection, the table name, the dataset name, the key-column name of the table, and provide the key value for the new region.
  • Only the key value and new geometry value are inserted into the newly created target table. For inserting the new region into an existing dataset, you may provide values for all of the dataset's attributes, or only the required ones.
  • An existing targets dataset must meet the following requirements:
    • The geometry metadata information for the target dataset must be available in the SDO_GEOM_METADATA view.
    • A spatial index must exist on the geometry column. Note that if a spatial index is not created on the geometry column, then the target data layer cannot be dragged on to the map visualization canvas.

    Note:

    Prior to Release 22.3, these target dataset requirements were implemented using SQL statements. However, from Release 22.3 onwards, if a new dataset is created to store the regions, then Spatial Studio automatically takes care of updating the geometry metadata and creating a spatial index.
  • For a new target dataset, once it is created and the first region is inserted, then the dataset can be manually added to the current active project and added as a layer to the map visualization. For subsequent processing, this new target dataset is treated as an existing target dataset.

4.2.4.1 Creating Custom Regions for Visualization

You can create custom polygon regions on the source dataset that contains polygon type geometries and apply them on a target dataset using the follow steps:
The instructions assume that the source and target datasets are already added to your Project in the ActiveProject page.
  1. Click the Visualizations tab on the left pane in the Active Project page.
    This lists the various visualization options.
  2. Click and drag Map from the list to the visualization window on the right to create a map visualization.
    A default base map is displayed with no data visualization layers.
  3. Click the Data tab on the left pane in the Active Project page.
    This lists all the Datasets that are loaded for the project.
  4. Click and drag the desired source dataset from the list to the map view on the right.
    A map layer with polygon shapes is created.
  5. Create the required custom regions by performing the following steps as many times as required:
    1. Select the regions for aggregation using the polygon selection tool in the map tool bar.

      Figure 4-8 Creating Custom Map Shapes

      Description of Figure 4-8 follows
      Description of "Figure 4-8 Creating Custom Map Shapes"

      Tip:

      Alternatively, you can also select multiple polygons by using the keyboard shortcut Ctrl + Click on a Windows system.
    2. Click custom_region_icon , Actions icon on the map tool bar and select Create Custom Region.
      Combining shape dialog opens as shown:

      Figure 4-9 Create a Custom Region

      Description of Figure 4-9 follows
      Description of "Figure 4-9 Create a Custom Region"
    3. Select the source dataset from the Combine shapes in drop-down list.
    4. Select one of the following desired options for Target dataset:
      • Create new: To create a new target dataset:
        1. Enter Connection, Table name, and Dataset name details for the new target dataset.
        2. Enter the Key column name and the Key value that uniquely identifies the custom map region.
      • Append to existing: To append the custom polygon shapes to an existing target dataset:
        1. Select an existing target dataset from the Append result to dataset drop-down list.
        2. Click Enter new shape attributes and enter a unique key value for the Key column name of the target dataset.
    5. Optionally, switch on or off the Include only selected items toggle button:

      Caution:

      The whole source dataset may be aggregated into one region if Include only selected items is switched off. In this case the process may run for a long time depending on the number of features in the source dataset. Therefore, use this option only if required.
    6. Click OK to create the custom map region.
  6. Drag and drop the target dataset to the map view on the right to view the newly created custom regions.
    The following figure shows the newly defined custom regions that were inserted into the target dataset.

    Figure 4-10 Displaying the Custom Shapes on the Target Dataset

    Description of Figure 4-10 follows
    Description of "Figure 4-10 Displaying the Custom Shapes on the Target Dataset"

4.2.4.2 Creating a Target Dataset

There are two ways to create a target dataset:
  • By Spatial Studio: Refer to the Create New Target Dataset option in the earlier section. Note that you must specify the key column name for the target dataset as the key values are stored in the key column names for the corresponding geometries (custom map regions).
  • By manual process: Perform the following steps to create a dataset manually:
  1. Connect to an Oracle database schema using SQL Developer or any other tools.
  2. Create a spatial table as shown:
    CREATE TABLE affected_regions (region_id NUMBER PRIMARY KEY, geom SDO_GEOMETRY);
  3. Insert the spatial table into USER_SDO_GEOM_METADATA view. For example:
    INSERT INTO USER_SDO_GEOM_METADATA VALUES (
    'affected_regions', -- TABLE_NAME
    'geom', -- COLUMN_NAME
    SDO_DIM_ARRAY -- DIMINFO attribute for storing dimension bounds, 0.5 m as tolerance
    (SDO_DIM_ELEMENT ('LONGITUDE', -180, 180, 0.5 ),
     SDO_DIM_ELEMENT ( 'LATITUDE', -90, 90, 0.5 )), 
    4326 -- SRID value for specifying a geodetic coordinate system
    );
    COMMIT;
  4. Create a spatial index on the SDO_GEOMETRY column.
    CREATE INDEX affected_regions_sidx ON affected_regions(geom) INDEXTYPE IS MDSYS.SPATIAL_INDEX_V2;
  5. Create a dataset in Spatial Studio from the database schema used in the preceding steps.
    The required target dataset is created. You may use this data layer on to which you can apply the newly created custom map regions.

4.2.5 Visualizing Spatiotemporal Datasets

Starting from Oracle Spatial Studio Release 23.2.0, you can visualize spatiotemporal datasets using the Cesium Timeline widget.

The following sections provide more information on the Cesium Timeline widget and the supported visualizations.

4.2.5.1 Overview of the Cesium Timeline Widget

Spatial Studio provides a new standalone Cesium Timeline widget starting from Release 23.2.

The Cesium Timeline widget in Spatial Studio provides the following capabilities:

  • Dataset filtering.
  • Serves as a hub for controlling all kinds of spatiotemporal data (such as live, historic, moving objects, and so on).

    The only exception being the GeoJSON URL based datasets. These datasets do not cater to Cesium timeline as the external URLs may not have the capability to provide GeoJSON corresponding to a time value, but are rather simply refreshed to provide newer values every x seconds.

  • Offers a scalable solution to add multiple layers of different dataset types at once that can be time-synced as required.

The following figure shows the Cesium Timeline Widget on a map visualization in Spatial Studio.

Figure 4-11 Cesium Timeline Widget

Description of Figure 4-11 follows
Description of "Figure 4-11 Cesium Timeline Widget"

The key concepts of the Cesium Timeline are as follows:

  • Cesium Timeline Modes: The timeline supports two modes of operation. If even one layer corresponding to a live dataset is listening to the timeline, then the mode of operation is LIVE. Otherwise, the mode of operation is always HISTORIC.
  • Cesium Clock Start Time: Starting point of the current range of timeline. This is the point in time from which the Cesium clock starts ticking.
  • Cesium Clock Stop Time: Ending point of the current range of timeline. This is the point in time until which the Cesium clock ticks. However upon reaching the end, the timeline behavior depends on the mode:
    • LIVE: The timeline will move ahead by updating the start time and stop time values as per the current time.
    • HISTORIC: The timeline will loop back to the start time.
  • Cesium Clock Current Time: The current time frame of the clock. It begins at the Cesium clock start time and ticks every 500ms. Optionally, you can slide the pointer on the timeline manually to set your current time.

    Also note the following with respect to the type of the spatiotemporal dataset:

    • Live Spatiotemporal Dataset: The Cesium clock current time value for such datasets is configured to always be pointing to current UTC time (unless manually changed).
    • Non-Live Spatiotemporal Dataset: If no other dataset is added to the timeline, then the Cesium clock for such a dataset automatically sets its range to minimum and maximum of the timestamp column, and the Cesium clock current time starts from the minimum value.
  • Multiplier: Multiplies to the interval at which the clock ticks (500ms) in order to make the clock jump ahead or rewind accordingly.
  • Timeline Playback Controls:
    1. Pause: Stops the timeline from animating and throwing tick events. The timeline pauses at current timeline frame.
    2. Forward and Backward Play Buttons: Makes the timeline animate in the chosen direction and includes the multiplier value (+/- Multiplier * 500ms)
  • Cesium Timeline settings: Allows you to control the timeline settings.

4.2.5.2 Configuring the Cesium Timeline Settings

You can configure custom settings for the Cesium timeline.

Perform the following steps to configure the Cesium Timeline settings in your map visualization.
The instructions assume that you have a project linked to a spatiotemporal dataset and the project is opened on your Active Project page.
  1. Click the Settings icon in your map tool bar.
  2. Switch ON the Show timeline toggle and click OK.
    The Cesium Timeline widget appears at the bottom of the map visualization canvas.
  3. Click timeline_settings_icon on the timeline to configure the Cesium timeline settings.

    The Timeline Settings dialog opens as shown:

    1. Select the Start Time and Stop Time to set the timeline range.
    2. Enter or select a multiplier value from the Type or select Multiplier value list box.

      You can use a preset (Second, Minutes, Hours, Days, Weeks, Month, Year) multiplier or type a value such as 15 or 15x.

    3. Select the Display Time Zone in which you want the Cesium timeline to display its current time and timeline labels.
    4. Optionally, switch ON the Autohide time of day.
      If you opt to autohide time of day, then the time values from the timeline labels are hidden if the timeline range selected is greater than a week.
    5. Click Apply.

4.2.5.3 About Map Layers and the Timeline

Learn more about the spatiotemporal map layers and the Cesium timeline.

  • In order to add a map layer to the timeline, you must first enable spatiotemporal in the underlying dataset for the map layer. See Enabling Spatiotemporal for a Dataset for more information.
  • You can then add one or more spatiotemporal map layers to the Cesium timeline by performing the following steps:
    • Click the Settings icon in your map tool bar and switch ON the Show timeline toggle to view the Cesium timeline widget at the bottom of the map visualization canvas.
    • Select the Add to Timeline option in the context menu of the map layer as shown:

      Figure 4-13 Adding a Map Layer to the Timeline

      Description of Figure 4-13 follows
      Description of "Figure 4-13 Adding a Map Layer to the Timeline"

      The map layer gets added to the timeline.

  • Note the following if you add multiple map layers to the timeline:
    • Each of these map layers respond to the timeline events independently. Therefore, you can configure each map layer to have its own properties (such as refresh time) and they then accordingly respond to the listener events. As the timeline events are thrown at every 500ms tick interval, each layer can have it own refresh time (more than 500ms) as to when they want to respond to these events.
    • Also, in case of the map layers for datasets with historic timestamp values, all layers will loop back as per the current timeline range. This may either correspond to the first layer added to the timeline or it can be a custom range that you set in the timeline settings.
    • If a layer corresponding to a live dataset is added to the timeline, then irrespective of the historic dataset layers listening to the timeline already, the timeline will never loop back and will keep moving forward.
  • If you make any changes to the underlying dataset properties of a map layer, which is already added to the timeline, such as:
      • Disabling the Enable Spatiotemporal toggle
      • Toggling Data is Live and Moving Objects

      Then, the listener gets removed from the timeline. In such cases, it is recommended that you remove the layer from the timeline and add it again after changing the properties.

    • If you change the Time Unit property of a standard filtering dataset, then this will take effect immediately and the filtering on the map visualization will adhere to the new Time Unit value.

4.2.5.4 Visualizing Live Moving Objects Dataset

You can visualize live moving objects on a map in Spatial Studio.

The following instructions assume that you have enabled spatiotemporal for such a dataset and the dataset is already added to the project in the Active Project page. See Configuring Spatiotemporal for Live Moving Objects Dataset for more information.
  1. Click the Visualizations tab on the left pane in the Active Project page.
    This lists the various visualization options.
  2. Click and drag Map from the list to the visualization window on the right to create a map visualization.
    A default base map is displayed with no data visualization layers.
  3. Click the Data tab on the left pane in the Active Project page.
    This lists all the Datasets that are loaded for the project.
  4. Click and drag the desired spatiotemporal dataset from the list to the map view on the right.
    Two map layers belonging to the dataset are created on the map. The second layer representing the trails of the moving object is added automatically in Spatial Studio. See Characteristics of Spatiotemporal Map Layers for Moving Objects Dataset for more information on the two map layers.
  5. Click the Settings icon in your map tool bar.
  6. Switch ON the Show timeline toggle and click OK.
    The Cesium timeline widget appears at the bottom of the map visualization canvas. However, the timeline is not operational at this step.
  7. Click Menu Icon against the primary layer in the Data tab of the Layers list and click Add to Timeline,
    Adding a map layer to the timeline will point to the current UTC time and the layer is now listening to the timeline events. However, the timeline is not operational at this step. Optionally, repeat this step to add multiple layers (of different spatiotemporal datasets) to the timeline and listen to its events.
  8. Configure animation for the map layer by following the steps in Configuring Animation for Moving Objects Dataset.

    Figure 4-14 Configuring Animation Settings

    Description of Figure 4-14 follows
    Description of "Figure 4-14 Configuring Animation Settings"
  9. Select Zoom Timeline to Range in the context menu of the map layer.

    The timeline is refocused on current UTC time.

  10. Optionally, configure custom Start Time, Stop Time, Multiplier, and so on from the timeline settings. You can also use the Cesium timeline controls and make the current time pointer slide to a different timeframe.
  11. Optionally, select Remove from Timeline in the context menu of the map layer if you wish the map layer to stop listening to the Cesium timeline.

4.2.5.5 Visualizing Live and Non-Moving Objects Dataset

You can visualize a spatiotemporal dataset having ongoing inserts of real-time data, but the locations of the data entities do not change.

The following instructions assume that you have enabled spatiotemporal for such a dataset and the dataset is already added to the project in the Active Project page. See Configuring Spatiotemporal for Live and Non-Moving Objects Dataset for more information.
  1. Click the Visualizations tab on the left pane in the Active Project page.
    This lists the various visualization options.
  2. Click and drag Map from the list to the visualization window on the right to create a map visualization.
    A default base map is displayed with no data visualization layers.
  3. Click the Data tab on the left pane in the Active Project page.
    This lists all the Datasets that are loaded for the project.
  4. Click and drag the desired spatiotemporal dataset from the list to the map view on the right.
    Two map layers belonging to the dataset are created on the map.
  5. Click the Settings icon in your map tool bar.
  6. Switch ON the Show timeline toggle and click OK.
    The Cesium Timeline widget appears at the bottom of the map visualization canvas. However, the timeline is not operational at this step.
  7. Click Menu Icon against the primary layer in the Data tab of the Layers list and click Add to Timeline.
  8. Select Configure Animation from the context menu of the map layer.
  9. Switch ON Animate layer based on automatic dataset refresh.
    The dataset animates with the Cesium clock events.
  10. Specify Time between auto refreshes to indicate the frequency of data refresh from the backend. This configuration also determines the smoothness and speed of the temporal animation.
    Also, note the following:
    • Spatial Studio displays a default frequency value which is same as the Data Change Rate value configured on the Spatiotemporal dataset used for the visualization.
    • Only one dataset layer for the geometry animates (attributes change) as per the Cesium clock's current time (which points to the present UTC time value) and the multiplier value (default is 1x). Since the dataset is a streaming entity it will not have data ahead of time. Hence you must not change the default Cesium clock values. If you expect the data to be updated every x minutes, then configure Time between auto refreshes to x minutes, but do not change the Cesium timeline range or the multiplier value.
  11. Select Zoom Timeline to Range in the context menu of the map layer to make the timeline reset to current clock time and a 1x multiplier.
    Upon reaching the set end time, the timeline will keep moving ahead and will not loop back.
  12. Optionally, select Remove from Timeline in the context menu of the map layer if you wish the map layer to stop listening to the Cesium timeline.

4.2.5.6 Visualizing Non-Live Moving Objects Dataset

You can visualize moving objects with historic timestamp values on a map in Spatial Studio.

The following instructions assume that you have enabled spatiotemporal for such a dataset and the dataset is already added to the project in the Active Project page. See Configuring Spatiotemporal for Non-Live Moving Objects Dataset for more information.
  1. Click the Visualizations tab on the left pane in the Active Project page.
    This lists the various visualization options.
  2. Click and drag Map from the list to the visualization window on the right to create a map visualization.
    A default base map is displayed with no data visualization layers.
  3. Click the Data tab on the left pane in the Active Project page.
    This lists all the Datasets that are loaded for the project.
  4. Click and drag the desired spatiotemporal dataset from the list to the map view on the right.
    Two map layers belonging to the dataset are created on the map. The second layer representing the trails of the moving object is added automatically in Spatial Studio. See Characteristics of Spatiotemporal Map Layers for Moving Objects Dataset for more information on the two map layers.
  5. Click the Settings icon in your map tool bar.
  6. Switch ON the Show timeline toggle and click OK.
    The Cesium Timeline widget appears at the bottom of the map visualization canvas. However, the timeline is not operational at this step.
  7. Click Menu Icon against the primary layer in the Data tab of the Layers list and click Add to Timeline.
    The map layer gets added to the timeline and the timeline will range from minimum value to maximum value of the timestamp column. the current time will point to the min value of the timestamp column and the layer is now listening to the timeline events. However, the timeline is not operational at this step. Optionally, repeat this step to add multiple layers (of different spatiotemporal datasets) to the timeline.
  8. Configure animation for the map layer by following the steps in Configuring Animation for Moving Objects Dataset.
  9. Select Zoom Timeline to Range in the context menu of the map layer.
    The timeline is refocused to range from minimum value to maximum value of the timestamp column and current time will point to the minimum value of the timestamp column. This acts as a looping mechanism for a historic dataset.
  10. Optionally, configure custom Start Time, Stop Time, Multiplier, and so on from the timeline settings. You can also use the Cesium timeline controls and make the current time pointer slide to a different timeframe.
  11. Optionally, select Remove from Timeline in the context menu of the map layer if you wish the map layer to stop listening to the Cesium timeline.

4.2.5.7 Visualizing Non-Live and Non-Moving Objects Dataset

You can visualize a spatiotemporal dataset that simply contains different timestamp values in each row which are not grouped by any entity ids.

The following instructions assume that you have enabled spatiotemporal for such a dataset and the dataset is already added to the project in the Active Project page. See Configuring Spatiotemporal for Non-Live and Non-Moving Objects Dataset for more information.
  1. Click the Visualizations tab on the left pane in the Active Project page.
    This lists the various visualization options.
  2. Click and drag Map from the list to the visualization window on the right to create a map visualization.
    A default base map is displayed with no data visualization layers.
  3. Click the Data tab on the left pane in the Active Project page.
    This lists all the Datasets that are loaded for the project.
  4. Click and drag the desired spatiotemporal dataset from the list to the map view on the right.
    A single map layer is created on the map.
  5. Click the Settings icon in your map tool bar.
  6. Switch ON the Show timeline toggle and click OK.
    The Cesium Timeline widget appears at the bottom of the map visualization canvas. However, the timeline is not operational at this step.
  7. Click Menu Icon against the primary layer in the Data tab of the Layers list and click Add to Timeline.
    The map layer gets added to the timeline and the timeline will range from minimum value to maximum value of the timestamp column. The current time will point to the minimum value of the timestamp column and the layer is now listening to the timeline events.

    Also, the filtering configured for the spatiotemporal settings will automatically be applied and the map layer will be filtered as per the Cesium clock current time. For example, if the Cesium clock current time is Monday, May 22, 2023 5:13 PM and the configured time unit for filtering is month, then the map visualization will show all the geometries that have the timestamps between May 1, 2023 and May 31, 2023.

    The multiplier of the timeline matches the filtering time unit selected. However, you can also change the time unit at which the dataset is currently being filtered (see Configuring Spatiotemporal for Non-Live and Non-Moving Objects Dataset).

    Figure 4-15 Applying Standard Filtering on a Map Layer

    Description of Figure 4-15 follows
    Description of "Figure 4-15 Applying Standard Filtering on a Map Layer"
  8. Select Zoom Timeline to Range in the context menu of the map layer.
    The timeline is refocused to range from minimum value to maximum value of the timestamp column and the current time will point to the minimum value of the timestamp column. This acts as a looping mechanism for a historic dataset.
  9. Optionally, select custom Start Time, Stop Time, Multiplier, and so on from the timeline settings. You can also use the Cesium timeline controls and make the current time pointer slide to a different time frame.
  10. Optionally, select Remove from Timeline in the context menu of the map layer if you wish the map layer to stop listening to the Cesium timeline.

4.2.5.8 Visualizing Spatiotemporal Data in OGC WMS Datasets

You can visualize OGC WMS datasets that contain spatiotemporal data.

The following instructions assume that you have enabled spatiotemporal for such a dataset and the dataset is already added to the project in the Active Project page. See Configuring Spatiotemporal for OGC WMS Datasets for more information.
  1. Click the Visualizations tab on the left pane in the Active Project page.
    This lists the various visualization options.
  2. Click and drag Map from the list to the visualization window on the right to create a map visualization.
    A default base map is displayed with no data visualization layers.
  3. Click the Data tab on the left pane in the Active Project page.
    This lists all the Datasets that are loaded for the project.
  4. Click and drag the desired spatiotemporal dataset from the list to the map view on the right.
    A single map layer is created on the map.
  5. Click the Settings icon in your map tool bar.
  6. Switch ON the Show timeline toggle and click OK.
    The Cesium Timeline widget appears at the bottom of the map visualization canvas. However, the timeline is not operational at this step.
  7. Click Menu Icon against the map layer in the Data tab of the Layers list and select Add to Timeline.
    The map layer gets added to the timeline. Although the timeline is now listening to the timeline events, it is still not operational.
  8. Select Configure Animation from the context menu of the map layer.
    The animation configuration dialog opens as shown:

    Figure 4-16 Configuring Animation for an WMS Dataset

    Description of Figure 4-16 follows
    Description of "Figure 4-16 Configuring Animation for an WMS Dataset"
  9. Switch ON Animate layer based on automatic dataset refresh.
    The dataset animates with the Cesium clock events.
    The dataset will poll the WMS service to fetch the images as per the time value under the Cesium clock current time.

    Figure 4-17 Visualizing WMS Dataset with Spatiotemporal Data

    Description of Figure 4-17 follows
    Description of "Figure 4-17 Visualizing WMS Dataset with Spatiotemporal Data"
  10. Specify Time between auto refreshes to indicate the frequency of data refresh from the backend. This configuration also determines the smoothness and speed of the temporal animation.
    Also, note the following:
    • Spatial Studio displays a default value of 2 seconds for WMS datasets. The effective refresh rates depend on how fast images are fetched from the respective WMS service. Empirically, for WMS data, any data change rate less than 2 seconds is not sufficient to retrieve image and refresh the tiles. It can cause incomplete image loading before the new refresh, or the visualization may remain stuck in refresh state.
    • The parameter ignores all the tick events from the timeline if the Cesium clock current time is less than previousRefreshTime + x seconds (or any other time unit). For example, if a dataset is supposed to refresh every 30 seconds, then configure this value in Time between auto refreshes so that even if the Cesium clock continues to throw tick events for all layers, this layer will ignore any such events.
  11. Specify a Time Unit.
  12. Optionally, select custom Start Time, Stop Time, Multiplier, and so on from the timeline settings. You can also use the Cesium timeline controls and make the current time pointer slide to a different time frame.

    Note:

    Zoom Timeline to Range is disabled for an OGC WMS dataset. This is because each WMS dataset may comprise more than one image layers and it will be inaccurate to choose a time range for any one of these layers automatically. Therefore, use the Cesium timeline settings (see Configuring the Cesium Timeline Settings) to manually set the appropriate range of the timeline for the specific image layer that you wish to animate.
  13. Optionally, select Remove from Timeline in the context menu of the map layer if you wish the map layer to stop listening to the Cesium timeline.

4.2.5.9 Visualizing GeoJSON URL Datasets with Spatiotemporal Data

You can visualize GeoJSON URL based datasets that contain spatiotemporal data.

The following instructions assume that you have enabled spatiotemporal for such a dataset and the dataset is already added to the project in the Active Project page. See Visualizing GeoJSON URL Datasets with Spatiotemporal Data for more information.
  1. Click the Visualizations tab on the left pane in the Active Project page.
    This lists the various visualization options.
  2. Click and drag Map from the list to the visualization window on the right to create a map visualization.
    A default base map is displayed with no data visualization layers.
  3. Click the Data tab on the left pane in the Active Project page.
    This lists all the Datasets that are loaded for the project.
  4. Click and drag the desired spatiotemporal dataset from the list to the map view on the right.
    A single map layer is created on the map.
  5. Click Menu Icon against the map layer in the Data tab of the Layers list and select Configure Animation.

    Note:

    GeoJSON URL based datasets are not dependent on the time values represented by the Cesium Timeline. They are just required to refresh periodically and therefore you need not enable the Cesium Timeline for such datasets.
  6. Switch ON Animate layer based on automatic dataset refresh.
  7. Specify Time between auto refreshes to indicate the frequency of data refresh from the backend. This configuration also determines the smoothness and speed of the temporal animation.
    The GeoJSON URL map layer is set to refresh periodically based on this configured interval value.

4.2.5.10 Configuring Animation for Moving Objects Dataset

You can animate a spatiotemporal map layer of a moving objects dataset based on Cesium map events.

The instructions assume that the spatiotemporal map layer is already added to the Cesium Timeline.
  1. Click Menu Icon against the primary layer in the Data tab of the Layers list.
    The context menu of the map layer displays the following options:

    Figure 4-18 Context Menu for a Map Layer

    Description of Figure 4-18 follows
    Description of "Figure 4-18 Context Menu for a Map Layer"
  2. Select Configure Animation.

    The animation settings for the map layer opens.

  3. Switch ON Animate layer based on automatic dataset refresh.
    The dataset animates with the Cesium clock events.
  4. Specify Time between auto refreshes to indicate the frequency of data refresh from the backend. This configuration also determines the smoothness and speed of the temporal animation.
    Also, note the following:
    • Spatial Studio displays a default frequency value which is same as the Data Change Rate value configured on the Spatiotemporal dataset used for the visualization.
    • All the map layers added to the timeline can individually have their own refresh or animation intervals.
    • The parameter ignores all the tick events from the timeline if the Cesium clock current time is less than previousRefreshTime + x seconds (or any other time unit). For example, if a dataset is supposed to refresh every 30 seconds, then configure this value in Time between auto refreshes so that even if the Cesium clock continues to throw tick events for all layers, this layer will ignore any such events.
  5. Specify a Time Unit.
  6. Specify How much data to load, the trail length of your moving object. A trail length value of N indicates that Spatial Studio must fetch the recent N units (unit value as specified in the following step) of data of the moving object during every refresh.

    Tip:

    If the underlying database table or view contains millions of records, you can limit the map animation to display only the most recent N units of data as configured in Trail Length.

    Note that Spatial Studio displays a default trail length value which is 15 times the Data Change Rate value configured on the Spatiotemporal dataset and is rounded to the nearest integer.

  7. Specify a Time Unit for the trail length.

    The animation settings are configured and you can view the animation of moving objects on the map.

    Note:

    You can choose a symbol and color for your moving object. However, ensure that the symbol you select adheres to the conditions explained in Characteristics of Spatiotemporal Map Layers for Moving Objects Dataset.

4.2.5.11 Characteristics of Spatiotemporal Map Layers for Moving Objects Dataset

This section describes the distinct characteristics of the primary and secondary map layers when visualizing a spatiotemporal dataset containing moving objects.

  • The trails map layer is considered the secondary layer to the main layer. If you delete the main layer from the map, then the trails map layer is automatically deleted as well.
  • The main layer which shares the same name as the dataset is always a Point-type layer, that you can visualize using either as circle or using symbols or icons. When you use symbols, Spatial Studio will also automatically rotate the symbol based on the direction your object is moving.

    Also note, the current release of Spatial Studio supports only those symbols that naturally point North (or point up) or those that do not represent an inherent direction or angle, such as any rounded symbols.

  • The main layer will keep its animation even when you toggle the secondary layer invisible. However, if you toggle the main layer invisible, the trail layer will remain static as no new data is fetched from the backend.
  • You cannot switch the main layer to Heatmap or Cluster type.
  • You cannot use sticky Tooltip or popup as they cannot stick to the moving object when it moves to new locations.
  • Spatial Studio drives the animation of moving objects and their trails by constantly refreshing the main layer’s data from the backend. This implies that the base table is queried and the last N seconds of data is fetched by filtering the records based on the TIMESTAMP column.
  • If you are working in a multi-user or multi-visualization environment or both, you must take care to avoid overloading the database with many animating layer's data refresh queries. For instance, ensure a layer is not refreshing its data too frequently, or fetching too many seconds of data on each refresh, or both.

4.2.6 Visualizing OGC WMS Maps as a Dataset

You can visualize an OGC (Open Geospatial Consortium) WMS (Web Map Service) dataset on a map.

This is in addition to creating a custom basemap that is based on external WMS maps, and switching to such a basemap in your map visualization. The main issue in using basemaps is that a single map visualization can only have one basemap. For instance, if you are using a basemap based on WMS images, then you can no longer display other background maps, such as OpenStreetMap. Therefore, the geographic context is lost as the WMS images typically do not contain detailed administrative boundaries, or other common features seen on a regular background map.

To overcome this limitation, Spatial Studio allows you to use a regular background map, while adding the WMS map images as a dataset layer on top. As the WMS images are just another dataset, which can be displayed as another layer on the map, you can easily reorder the layers, or toggle the visibility of the WMS images just like with any other map layer.

To visualize an OGC WMS dataset on a map, you must perform the following steps.
As a prerequisite ensure the following:
  • The OGC WMS dataset is created using an OGC WMS connection and exists in Spatial Studio. See Creating an OGC WMS Dataset for more information.
  • The required OGC WMS dataset is added to the project in the Active Project page.
  1. Click the Visualizations tab on the left pane in the Active Project page.
    This lists the various visualization options.
  2. Click and drag Map from the list to the visualization window on the right to create a map visualization.
    A default base map is displayed with no data visualization layers.
  3. Click the Data tab on the left pane in the Active Project page.
    This lists all the Datasets that are loaded for the project.
  4. Drag and drop the desired OGC WMS dataset from the list to the map view on the right.
    The OGC WMS data layer gets displayed on the map. The map will automatically zoom to the area covered by the WMS dataset if it is the very first dataset to be added to your map.

    Figure 4-19 Visualizing an OGC WMS Data Layer

    Description of Figure 4-19 follows
    Description of "Figure 4-19 Visualizing an OGC WMS Data Layer"

    The preceding figure illustrates the weather pattern images (loaded from a WMS service) which are overlaid on top of the OpenStreetMap background.

    Tip:

    Click the Image link on the map legend to view the legend information generated by the WMS service for the OGC WMS map layer.

    Note:

    When you display a new WMS dataset for visualization, your browser will be sending the WMS image requests directly to the WMS server. You can always refresh the map layer to reflect the current data from the WMS server.

4.2.7 About Wind Animation

Starting from Oracle Spatial Studio Release 24.2.0, you can create and visualize wind animations that depict the direction of flow between various locations.

Although commonly referred to as wind animation, this visualization applies for any movement-based visualization. For instance, it can be used to render wind speeds, depict tectonic plate movements, or other vector-based simulations. The following figure shows a sample wind animation in Spatial Studio:

Figure 4-20 Sample Wind Animation



These visualizations rely on wind velocities along the x (u) and y (v) axes as input. These velocities are encoded within an image, where the red (R) and green (G) channels represent the x and y velocities, respectively. The values are scaled and mapped to an integer range of 0–255, with the R channel holding the u velocities and the G channel holding the v velocities.

The base image thus serves as a grid of u and v velocities at each integral longitude and latitude point within the specified bounding box (bbox). With this setup, the visualization generates random particles on the map, which are then animated according to the wind velocities, creating dynamic flowing visuals.

The following shows a sample base image that can be used to create a wind animation:

Figure 4-21 Sample Base Image for Wind Animation



The base image for the wind animation can be generated from a NOAA dataset or from any other supported data providers (see Generating a Base Wind Image From a NOAA Dataset for an example). You can then load this image as GeoRaster to Oracle Database and create a wind animation dataset for visualization.

4.2.7.1 Generating a Base Wind Image From a NOAA Dataset

This section provides the steps for generating a base wind image using a NOAA provider.

You can generate a base image for creating a wind animation dataset from the NOAA GFS Dataset website or programmatically through scripts.
  1. Open the URL NOAA GFS Dataset in your browser.
  2. Select a Subdirectory for any specified data and time and proceed to the atmos option to work with atmospheric data.
  3. Set the file type to gfs.t06z.pgrb2.1p00.f000.
  4. Select the layer type as 10m above the ground.
  5. Select the UGRD (U-component of wind, eastward velocity) variable, specify the bounding box (bbox) you wish to analyze, and then click Start Download.
  6. Repeat the previous step for VGRD (V-component of wind, northward velocity).
    Note that the velocity grids are downloaded as GRIB files.
  7. Parse to extract the grid values from these files using GRIB tools (for example, wgrib2).
  8. Create the base image by combining the grid values for UGRD and VGRD.
    Note the following for creating the base image:
    • The R (Red) channel represents UGRD (x-axis velocities).
    • The G (Green) channel represents VGRD (y-axis velocities).
    • The velocity values must be scaled to fit within the 0-255 range, where umin, umax, vmin, and vmax represent the minimum and maximum values for the u (x-axis) and v (y-axis) velocities.

      These minimum and maximum values are crucial for encoding and decoding the velocity values from the base image, as they will be scaled to fit the 0-255 range for visualization purposes.

      Note:

      It is important that you note the data range values as these will be required to create the wind animation dataset for the first time in Spatial Studio.
    Alternatively, you can generate the base wind image programmatically through code as shown in the following example scripts.

    The following scripts describe the steps for downloading, parsing grid values, and finally writing them into an image format for use in visualization.

    download.sh

    #!/bin/bash
     
    GFS_DATE="20240719"
    GFS_TIME="00"; # 00, 06, 12, 18
    RES="1p00" # 0p25, 0p50 or 1p00
    BBOX="leftlon=0&rightlon=360&toplat=90&bottomlat=-90"
    LEVEL="lev_10_m_above_ground=on"
    GFS_URL="https://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_${RES}.pl?dir=%2Fgfs.${GFS_DATE}%2F${GFS_TIME}%2Fatmos&file=gfs.t06z.pgrb2.1p00.f000&${LEVEL}=on&subregion=${BBOX}"
    curl "${GFS_URL}&var_UGRD=on" -o utmp.grib
    curl "${GFS_URL}&var_VGRD=on" -o vtmp.grib
     
    grib_set -r -s packingType=grid_simple utmp.grib utmp_out.grib
    grib_set -r -s packingType=grid_simple vtmp.grib vtmp_out.grib
     
    printf "{\"u\":`grib_dump -j utmp_out.grib`,\"v\":`grib_dump -j vtmp_out.grib`}" > tmp.json
     
    rm utmp.grib vtmp.grib utmp_out.grib vtmp_out.grib
     
    DIR=`dirname $0`
    node ${DIR}/prepare.js ${1}/${GFS_DATE}${GFS_TIME}

    prepare.js

    const PNG = require('pngjs').PNG;
    const fs = require('fs');
     
    const data = JSON.parse(fs.readFileSync('tmp.json'));
    const name = process.argv[2];
    const umessage = data.u.messages[0];
    const vmessage = data.v.messages[0];
     
    const unpack = (message) =>
        message.reduce((acc, { key, value }) => ({ ...acc, [key]: value }), {});
    const u = unpack(umessage);
    const v = unpack(vmessage);
     
    const width = u.Ni;
    const height = u.Nj;
     
    console.log(`Width: ${width}, Height: ${height}`);
    console.log(`u: min=${u.minimum}, max=${u.maximum}`);
    console.log(`v: min=${v.minimum}, max=${v.maximum}`);
    console.log(`u values length: ${u.values.length}, v values length: ${v.values.length}`);
     
    const png = new PNG({
        colorType: 2,
        filterType: 4,
        width: width,
        height: height
    });
     
    for (let y = 0; y < height; y++) {
        for (let x = 0; x < width; x++) {
            const i = (y * width + x) * 4;
            const k = y * width + x;
     
            if (k < 0 || k >= u.values.length || k >= v.values.length) {
                console.error(`Index out of bounds at (x: ${x}, y: ${y}) -> k: ${k}`);
                continue;
            }
     
            const uValue = u.values[k];
            const vValue = v.values[k];
     
            if (isNaN(uValue) || isNaN(vValue)) {
                console.error(`Invalid value at (x: ${x}, y: ${y}) -> u: ${uValue}, v: ${vValue}`);
                continue;
            }
     
            png.data[i + 0] = Math.floor(255 * (uValue - u.minimum) / (u.maximum - u.minimum));
            png.data[i + 1] = Math.floor(255 * (vValue - v.minimum) / (v.maximum - v.minimum));
            png.data[i + 2] = 0;
            png.data[i + 3] = 255;
        }
    }
     
    png.pack().pipe(fs.createWriteStream(`/Users/user1/Downloads/build/${name}.png`));
     
    fs.writeFileSync(`/Users/user1/Downloads/build/${name}.json`, JSON.stringify({
        source: 'http://nomads.ncep.noaa.gov',
        date: formatDate(u.dataDate + '', u.dataTime),
        width: width,
        height: height,
        uMin: u.minimum,
        uMax: u.maximum,
        vMin: v.minimum,
        vMax: v.maximum
    }, null, 2) + '\n');
     
    function formatDate(dateStr, timeStr) {
        const year = dateStr.slice(0, 4);
        const month = dateStr.slice(4, 6);
        const day = dateStr.slice(6, 8);
        const hour = String(timeStr).padStart(4, '0');
        return `${year}-${month}-${day}T${hour.slice(0, 2)}:00:00Z`;
    }

4.2.7.2 Visualizing a Wind Animation Dataset

You can create a wind animation visualization in Spatial Studio.

The following instructions assume that you have a wind animation enabled GeoRaster dataset and the dataset is already added to the project in the Active Project page. See Creating a Wind Animation Dataset and Enabling Wind Animation For an Existing GeoRaster Dataset for more information.
  1. Click the Visualizations tab on the left pane in the Active Project page.
    This lists the various visualization options.
  2. Click and drag Map from the list to the visualization window on the right to create a map visualization.
    A default base map is displayed with no data visualization layers.
  3. Click the Data tab on the left pane in the Active Project page.
    This lists all the Datasets that are loaded for the project.
  4. Click and drag the desired wind animation dataset from the list to the map view on the right.
    The wind animation visualization gets displayed as shown:

    Figure 4-22 Visualizing Wind Animation



    It is important to note that wind animations do not support pitch and rotation actions. If the view is rotated or pitched, then the wind animation will be disabled, and a warning will be displayed. The wind animation will automatically be reenabled once the pitch/rotate is returned to the default (0).

  5. Optionally, click Menu Icon against the wind animation dataset layer in the Data tab of the Layers list and configure the following properties.
    • Number of Particles: Controls how many particles are randomly drawn in the current viewport. These particles will be animated based on the wind velocities.
    • Speed Factor: A multiplier between zero and one that adjusts the on-screen movement in relation to the actual wind speed.
    • Fade Opacity: Manages the length of particle trails and when they should fade out, affecting the smoothness of the animation.