3.6 Spatial Studio Datasets Page

The Datasets page lets you view and edit existing datasets, and also create new ones.

The following figure shows the Datasets page:

Datasets that are displayed on the Datasets page belong to one of the following two categories:

  • Manually created by clicking Create Dataset or when you perform a Save as operation with the Create Dataset option enabled. This dataset can then be added to the project for visualization.
  • Automatically created when you perform spatial analysis, save selected features, or store pins as a map layer.

    This dataset gets instantly added to the map visualization and also appears listed in the Datasets page. Such a dataset is known as a spatial analysis dataset.

You can perform the following actions on the Datasets page:

  • You can manually create a new dataset, by clicking Create Dataset.
  • You can filter to view datasets that are either created by you, or shared with you, or both.
  • By clicking additional_options_icon against any displayed dataset or by right-clicking a dataset row, you can perform the following actions:
    • Properties: View or modify properties of the dataset
    • Update Statistics: Update the dataset statistics (refer to Updating Statistics for Datasets)
    • Create Project: Create a new project using the dataset
    • Add to Active Project: Add the dataset to the project in the Active Project page
    • Export: Export the dataset (in GeoJSON or CSV file format)
    • Save as: Make a new copy of the dataset
    • Permissions: Configure dataset sharing and permissions
    • Cache: Control map tiles pre-caching activities (refer to About Cache in Spatial Studio)
    • Prepare: Prepare a dataset for any of the following options:
      • Geocode Addresses: Add geocoded information such as geographic coordinates to the dataset
      • Clear Address Geocode: Remove geocoded information from the dataset
      • Reverse Geocode: Add address information from a set of geographic coordinates to the dataset
      • Create Lat/Lon Index: Create latitude/longitude index
      • Drop Lat/Lon Index: Remove latitude/longitude index
      • Create H3 Index: Prepare an H3 aggregation dataset
      • Join to Spatial Dataset: Prepare a non-spatial dataset for map visualization by joining to a spatial dataset
      • Validate/Fix geometries: Validate the geometries in the dataset and also fixes the geometries where it is possible for Spatial Studio to do so in an automatic manner.
    • Delete: Delete the dataset

3.6.1 About Creating a Dataset From the Datasets Page

Spatial Studio allows you to create different types of datasets from the Datasets page.

The following figure describes the supported options to create a dataset:

As seen in the preceding figure, you can create a dataset from the following sources:

  • Oracle Database table or view using a database connection
  • By specifying a GeoJSON URL
  • By configuring an OGC Web Map Service
  • By uploading dataset files with different formats as supported by Spatial Studio
  • By importing geospatial data directly from an external file URL
  • By importing 3D Tiles Tileset

The following sections explain in detail the steps to create a dataset using the supported options:

3.6.1.1 Creating a Dataset from Database Tables or Views

Using a database connection, you can create a dataset from tables and views in the Oracle Database.

Perform the following steps to create a dataset using a database connection:
  1. Navigate to the Datasets page.
  2. Click Create Dataset.
    The Create Dataset window opens.
  3. Select the Database table/view option.
  4. Select a connection from the Select Connection drop-down.
  5. Click Create.

    The Select items to create datasets window opens listing all the tables, views and GeoRaster data present in the database.

    Figure 3-9 Select the Data Source

    Description of Figure 3-9 follows
    Description of "Figure 3-9 Select the Data Source"
  6. Select a database item from the list and click OK.

    Tip:

    You can also use the Search box to quickly locate your table. This is especially useful or even necessary if your database connection has many tables, as the drop-down list only shows up to 500 tables or views.

    The new dataset is added and listed on the Datasets page.

3.6.1.2 Creating a GeoRaster Dataset

Spatial Studio allows you to create Georaster datasets.

You can create a GeoRaster dataset using the following steps.
The instructions assume that the GeoRaster data is already existing in your database schema.
  1. Navigate to the Datasets page and click Create Dataset.
  2. Click Database table/view, select a Connection and click Create.
  3. Click GeoRasters, select the required GeoRaster table and click OK as shown:

    Figure 3-10 Creating a GeoRaster DataSet

    Description of Figure 3-10 follows
    Description of "Figure 3-10 Creating a GeoRaster DataSet "
    The Geo-raster Configuration dialog opens.
  4. Choose a Selection Mode.
    The values for the selection mode are:
    • Single Raster
    • Virtual Mosaic
  5. Select the GeoRaster column for visualization if you have chosen the Single Raster mode. Otherwise, you can skip this step.

    Note:

    If you have chosen the Virtual Mosaic mode, all the Georaster columns are included in the visualization.
  6. Click OK.
    The GeoRaster dataset is configured and the newly created GeoRaster dataset is displayed as a row in the Datasets page.

3.6.1.3 Creating a GeoJSON URL Dataset

You can create a dataset by specifying a GeoJSON URL.

It is important to note the following prior to creating a GeoJSON URL dataset:

  • A GeoJSON URL based dataset accesses its data directly from the source URL. There is no database table managed in Spatial Studio for this dataset.
  • A GeoJSON URL based dataset does not support Spatial Analysis.
  • A GeoJSON URL based dataset is subject to the same upload size limit, or 100MB, whichever is smaller.
  • If a GeoJSON URL does not support CORS (Cross-Origin Resource Sharing), then Spatial Studio will act as a proxy to the browser requesting the GeoJSON URL data.
Perform the following steps to create a GeoJSON URL dataset:
  1. Navigate to the Datasets page.
  2. Click Create Dataset.
    The Create Dataset window opens.
  3. Select the GeoJSON URL option.
  4. Specify the GeoJSON URL to access GeoJSON data from an external domain for map visualization.

    Note:

    Ensure you add the external domain used for accessing GeoJSON data to the list of entries in the Safe Domains list.
  5. Click Create.

    Create dataset from GeoJSON window opens as shown:

    Figure 3-11 Creating a Dataset from GeoJSON

    Description of Figure 3-11 follows
    Description of "Figure 3-11 Creating a Dataset from GeoJSON"
  6. Optionally, enter a Dataset name.
  7. Click Submit.

    The GeoJSON URL dataset gets created with the warning, No key column was found. You must resolve the warning in order to use the dataset as a map layer for visualization. See Datasets with Issues for more details to resolve the warning.

3.6.1.4 Creating an OGC WMS Dataset

Starting with Spatial Studio release 22.3, you can define datasets that are based on the GetMap responses from any external OGC (Open Geospatial Consortium) WMS (Web Map Service) services.

Prior to creating a WMS dataset, ensure that the required OGC WMS connection is created in Spatial Studio.
Perform the following steps to create an OGC WMS dataset:
  1. Navigate to the Datasets page.
  2. Click Create Dataset.
    The Create Dataset window opens.
  3. Select OGC Web Map Service.
  4. Select the WMS Connection to be used from the drop-down list.
  5. Explore all the available WMS map layers from the external WMS server and select the required one.

    You can Shift+Click to select more than one layer. The external WMS server combines multiple layers into a single image as a response to Spatial Studio’s requests for the new WMS dataset.

    Figure 3-12 Selecting the WMS Layer to Create a WMS Dataset

    Description of Figure 3-12 follows
    Description of "Figure 3-12 Selecting the WMS Layer to Create a WMS Dataset"
  6. Enter the Dataset name.
  7. Click OK.
    The OGC WMS dataset gets created and is displayed on the Datasets page.

    When this WMS dataset is displayed on a map visualization, Spatial Studio will obtain and display the images for both the selected layers.

3.6.1.5 Creating a Dataset by Uploading a File

You can create a dataset by uploading a file in a format supported by Spatial Studio.

The supported file formats are as follows:
  • Excel file
  • Shapefile
  • GeoJSON file
  • CSV file
  • KML file

Also, note the following:

  • WKT or GeoJSON geometry text values in Excel or CSV files are supported.

    If you are uploading a file with WKT text values, then only WKT strings representing geodetic coordinates (longitude and latitude) are supported.

  • Three dimensional coordinates are supported in GeoJSON files.
  1. Navigate to the Datasets page.
  2. Click Create Dataset.
    The Create Dataset window opens.
  3. Select the Local File option.
  4. Upload any one of the supported file types.
  5. Click Create.

    The new dataset is added and listed on the Datasets page.

3.6.1.5.1 Uploading a Shapefile

You can create a dataset by uploading a shapefile.

A shapefile contains the geospatial data which can be referenced in multiple files with specific file extensions. The following lists a few selected files that contribute to shapefile format:
  • .shp - Stores the geometry data
  • .shx - Stores the index of the geometry
  • .dbf - Stores the attribute information of geometry features
  • .prj - Stores the coordinate system information
  • .cpg - Specifies the character set to be used
  1. Navigate to the Datasets page and click Create Dataset.
    Create Dataset window opens as shown in Figure 3-8.
  2. Select Local File.
  3. Click upload_icon to upload the shape file.
    The File Upload window opens.
  4. Select all the required files from your system.

    Note:

    It is mandatory to upload .shp, .shx, and .dbf files.

    The Create dataset from shapefile dialog opens as shown:

    Figure 3-13 Create dataset from shapefile

    Description of Figure 3-13 follows
    Description of "Figure 3-13 Create dataset from shapefile"
  5. Select the connection to upload the shapefile from the Upload to connection drop-down list.
  6. Optionally, change the Table name.
  7. Optionally, change the destination Dataset name.
  8. Optionally, select the Coordinate System to be used.
    • If your shapefile includes a .prj file referencing a custom Geographic Coordinate System (GEOGCS), then Spatial Studio will assign a best-matched geodetic SRID from the target Spatial database, as shown in the preceding figure.
    • If your shapefile does not contain a .prj file, then the system uses the default EPSG:4326 GEOGCS.
  9. Optionally, select the required Character set.
    Spatial Studio automatically detects the character set to be used in the following order of priority:
    • Extracts the charset-name from a .cpg file, if present.
    • Uses the character set specified in the .dbf file header.
    • Otherwise, uses the default ISO-8859-1.

    You can preview the file attributes using the detected character set. However, you can still choose to switch to a different Character set and preview the refreshed contents.

  10. Click Submit.
    The dataset gets created from a shapefile.

3.6.1.6 Creating a Dataset Using a File URL

You can create a dataset by specifying the URL of an external server which hosts the geospatial file.

Perform the following steps to create a dataset using an external file URL:
  1. Navigate to the Datasets page.
  2. Click Create Dataset.
    The Create Dataset window opens.
  3. Select the File URL option.
  4. Specify the File URL to access the geospatial data from an external domain.
    The following file types are supported:
    • Excel spreadsheet
    • CSV file
    • KML file
    • Shape files contained in one zip file
  5. Click Create.

    For instance, if you are accessing a CSV file using the file URL, then Create dataset from a csv file dialog opens as shown:

    Figure 3-14 Creating a Dataset from a File URL

    Description of Figure 3-14 follows
    Description of "Figure 3-14 Creating a Dataset from a File URL"
    1. Select the connection to upload the shapefile from the Upload to connection drop-down list.
    2. Optionally, change the Table name.
    3. Optionally, change the destination Dataset name.
    4. Click Submit to create the dataset.

3.6.1.7 Creating a Dataset from Cesium Datasets

Spatial Studio supports Cesium map visualization by allowing you to create a dataset from a 3D dataset or a CZML file.

Perform the following steps to create a dataset from Cesium datasets:
  1. Navigate to the Datasets page.
  2. Click Create Dataset.
    The Create Dataset window opens.
  3. Select the Cesium formats option.

    Figure 3-15 Options for Creating a Cesium Dataset

    Description of Figure 3-15 follows
    Description of "Figure 3-15 Options for Creating a Cesium Dataset"
  4. Select a 3D dataset location option.
    • Upload czml file: Upload a .czml file.
    • Upload tileset: Upload a tileset zip file. The supported formats are:
      • .b3dm: Batched
      • .pnts: Point Cloud

      Tip:

      You can increase the default size limit for zip files larger than 50 MB by updating the dataset_max_size attribute for the upload property defined in <user_home_folder>/.sgtech/sgtech_config.json file.
    • Czml file located on server: Specify the czml file to be uploaded from the server by entering the Name of the .czml file and the Directory path.
    • Tileset located on the server: Specify the tileset file to be uploaded from the server by entering the Name of the tileset.json file and the Directory path.

    Note:

    When uploading a CZML file or a tileset file from the server:

    • If the file is not under <SGTECH_HOME>/cesiumdata or <SGTECH_HOME>/3d-tilesets as it may apply, then you must manually migrate the datasets when migrating Spatial Studio.
    • You can update the unzipped file limits in the General tab in the Administration page. The following two advanced settings parameters need to be modified:
      • Maximum unzipped item
      • Maximum unzipped total
  5. Click Create.

    The new dataset is added and listed on the Datasets page.

3.6.2 About Spatial Analysis Datasets

Spatial Studio stores the results of a spatial analysis operation in a spatial analysis dataset. Also, storing selected geographic features or pins on a map layer gets saved as a new spatial analysis dataset.

When you perform any new spatial analysis operation (such as filtering, combining, transforming existing datasets, and so on) against a data source in map visualization, the results of the analysis are generated into a spatial analysis dataset. Similarly, when you store selected geographic locations or pins on a map layer, the spatial data gets stored as spatial analysis datasets. These datasets get instantly added to the map visualization project and appear under Analysis in the Active Project page. You can also view these datasets on the Datasets page.

3.6.2.1 Saving Selected Features on a Map Into a Dataset

You can save selected features on a map layer into a new spatial analysis dataset.

The following steps enable you to save selected features on a map layer into a dataset.

The instructions assume that you have a project opened on your Active Project page.
  1. Select the required features to be saved to the dataset.
    If you are using a Windows system, you can select multiple features using the keyboard shortcut Ctrl+Click.
  2. Click the Actions icon on the map tool bar.
  3. Select Save Selections from the drop-down menu.

    The Save selections dialog opens.

  4. Enter the Analysis name.
  5. Select the required columns from the Save Selections From drop-down list.
  6. Click Run.

    The new (analysis) dataset containing the saved selections is created and gets listed under Analyses on the left pane in the Active Project page. It also appears on the table in the Datasets page.

  7. Verify the selection, by dragging and dropping the analysis dataset on the map view.
    You can now view only selected features on the map layer:

    Figure 3-17 Visualizing Saved Selections

    Description of Figure 3-17 follows
    Description of "Figure 3-17 Visualizing Saved Selections"

3.6.2.2 Saving Pins on a Map Into a Dataset

You can save all the pins that you dropped on a map layer into a spatial analysis dataset.

This dataset containing the stored pins can later be used in various spatial analyses.

The following steps enable you to save multiple pins on a map layer into a dataset.

The instructions assume that you have a project opened on your Active Project page and the map layer displayed for visualization contains multiple pins.
  1. Click the Actions icon on the map tool bar.
  2. Select Save Pins from the drop-down menu.

    Figure 3-18 Saving Pins on a Map Layer

    Description of Figure 3-18 follows
    Description of "Figure 3-18 Saving Pins on a Map Layer"

    The Save pinned places dialog opens.

  3. Enter the Analysis name.
  4. Select the required Connection for saving the dataset.
  5. Click Run.

    The new dataset containing the pins is created and gets listed under Analyses on the left pane in the Active Project page. It also appears on the table in the Datasets page.

  6. Verify the saved pins, by dragging and dropping the analysis dataset on the map view.

    The saved pins are displayed as points and not as a pin location on the map layer. This is because the pins get saved to a regular point type dataset. You can now perform various spatial analyses on the map using this dataset layer.

Related Topics

3.6.3 Datasets with Issues

All datasets in Spatial Studio must meet certain data requirements in order to be used for map visualization and analysis.

Otherwise, Spatial Studio highlights these datasets with a warning on the Datasets page.

You may click on the warning icon to view the issues. You can then click on the resolution link under the issue to prepare the dataset as required for analysis, as shown:

Figure 3-19 Warnings on a Dataset

Description of Figure 3-19 follows
Description of "Figure 3-19 Warnings on a Dataset"
The following table lists a few common issues that are highlighted on a dataset.

Table 3-2 Selected List of Dataset Issues

Issue Cause Spatial Studio Resolution
No key column was found Primary key is missing on the dataset.
  • Click Go to Dataset Columns to create a dataset key.

    The Dataset Properties configuration window opens.

  • Select a column containing unique values and switch ON Use as Key.
  • Click Validate key.
  • Click Apply.
This dataset needs spatial metadata and index The geometry column in the dataset does not have the spatial metadata or a spatial index or both. Click Create Spatial Metadata and Index to create the spatial metadata and index for the geometry column.
Preparation Required for mapping and spatial analysis It can be due to one of the following reasons:
  • The dataset contains address information but the geographic coordinates are missing.
  • Latitude and Longitude index are missing for latitude/longitude data in the dataset.
Depending on the cause, you may need to perform one of the following:
  • Click Geocode Addresses
  • Click Create Latitude/Longitude Index

3.6.3.1 Enabling Spatial on a View-Based Dataset with Latitude and Longitude Columns

Spatial Studio allows you to create spatial index on a dataset created from a view containing latitude and longitude columns, thereby enabling you to visualize and analyze views.
The following steps enable you to create latitude/longitude index on a view-based dataset.

The instructions assume:

  • You have created a dataset from a view having latitude and longitude columns.

    See Creating a Dataset from Database Tables or Views for more information on creating a dataset from a view.

  • This view-based dataset is listed on the Datasets page with a warning icon since the dataset is not spatially enabled for visualization.
  1. Navigate to the Datasets page.
  2. Click on the warning icon to view the issues on the view-based dataset.
  3. Click Create Latitude/Longitude Index.
    The Latitude and Longitude Columns window opens as shown:

    Figure 3-20 Creating a Latitude/Longitude Index on a View-Based Dataset

    Description of Figure 3-20 follows
    Description of "Figure 3-20 Creating a Latitude/Longitude Index on a View-Based Dataset"
  4. Select the Latitude Column.
  5. Select the Longitude Column.
  6. Select the Reuse lat/lon index on the base table checkbox.
    Note that irrespective of whether the spatial index on the latitude and longitude columns exists in the underlying base table (or view) or not, you must always select this checkbox. If there is no spatial index in the underlying base table (or view), Spatial Studio will simply update the dataset's metadata and mark it as ready for spatial visualization. This enables you to perform map visualizations, although it may not be as performant as when there is a spatial index in place.
  7. Click OK.
    A background task of type Create lon-lat index gets executed. A successful completion of this task on the Jobs page indicates that the dataset is spatially enabled for visualization.

    You can now use this view-based dataset for visualization on the Active Project page.

3.6.4 Geocoding a Dataset

Geocoding is the process of deriving the latitude and longitude coordinates from location details that are geo address types.

You can geocode a dataset in Spatial Studio to store the resulting latitude and longitude information as a SDO_GEOMETRY column. Optionally, you can also store them in latitude and longitude numeric columns in the underlying database table referenced by the dataset.

Prior to geocoding a dataset, if the Spatial Studio server is running behind a firewall, then ensure you have the correct Web Proxy information configured in the Administration page. This is because the Spatial Studio application uses an external Oracle hosted geocoding service which is on the public internet.

You can perform the following steps to geocode a dataset.

The instructions assume that a dataset containing location columns such as address details is already existing in Spatial Studio.
  1. Navigate to the Datasets page.
  2. Right-click on the dataset name on which you want to apply geocoding.
    Ensure that the dataset has a valid key column defined.
  3. Select Geocode Addresses from the Prepare context menu.
    Geocode Addresses dialog opens as shown:
  4. Click Setup tab.
  5. Select the Geo-type for the geo-attributes to be used for geocoding.
    You must provide sufficient geographic data for successful geocoding. If the address components do not include the country or state attributes, then you must explicitly select either the country or the state in the respective drop-down list shown highlighted in the preceding figure.
  6. Optionally, switch ON Save coordinates in columns to save the geocoordinates to the dataset and to the underlying database table.
  7. Optionally, enter Latitude column name and Longitude column name, if you switched ON Save coordinates in columns in the preceding step.
  8. Click Apply.
    The geocoding process gets initiated and can be monitored on the Jobs page. Also, note the following:
    • The geocoding process is performed in batches and the default batch size is 50. At any time, you can change the default geocoding batch size under the General settings in the Administration page.
    • If any batch fails, the overall geocoding job will not fail. You will be notified on the failed batch at the end of job completion.
    • At the end of the geocoding process, you can view the results in the Status tab as shown:
    • On successful completion of a geocoding job, you can verify that geocoding has been applied by viewing the latitude and longitude columns in the dataset properties and in the input source database table along with the GC_GEOMETRY column of data type SDO_GEOMETRY.

3.6.5 Reverse Geocoding a Dataset

Reverse geocoding is the process of deriving the address information from a set of latitude and longitude coordinates.

You can reverse geocode a dataset in Spatial Studio to add address information to the dataset's table using the following steps.

Note:

Reverse Geocoding is supported only in point or latitude and longitude datasets.
The instructions assume that a dataset containing the coordinates details is already existing in your database schema.
  1. Navigate to the Datasets page.
  2. Right-click on the dataset name on which you want to apply reverse geocoding.
  3. Select Reverse Geocode from the Prepare context menu.
  4. Optionally, select and modify the required Location attributes as shown in Figure 3-23.
    The Input text fields for Location attributes are the column names to be created in the underlying database table for the target dataset.
  5. Select the Advanced option as required.
    The default Reverse geocode to named roads only option ensures that for all latitude and longitude coordinates that do not match a named road, the closest street or road name will be obtained while geocoding.
  6. Click Apply.
    You can monitor the Reverse geocode dataset background task on the Jobs page. A successful completion of the job indicates that reverse geocoding is applied for the data in the dataset.
    You can verify that reverse geocoding has been applied to your dataset by viewing the additional address related columns in the dataset properties.

3.6.6 Enabling Spatiotemporal for a Dataset

In order to visualize and animate spatiotemporal data, you must enable Spatiotemporal for the dataset on the Datasets page.

Spatial Studio supports visualization and animation of spatiotemporal map layers using a Cesium Timeline widget (see Overview of the Cesium Timeline Widget). These map layers can listen to the timeline only if you enable Spatiotemporal on the underlying datasets.

Characteristics of a Spatiotemporal Dataset

Spatial Studio considers a dataset to contain spatiotemporal data if it belongs to any one of the following types.
  • Live Spatiotemporal Dataset: A dataset which meets the following characteristics is known as a Live dataset:
    • The dataset is based on a geometry table or view with a geometry column or pair of latitude/longitude columns.
    • The dataset has one or more entities (that represent an object in the dataset) which are uniquely identified by one of the columns.
    • The dataset's underlying table or view contains a column of the type TIMESTAMP or DATE (or a qualifying field in the GeoJSON response), that stores the UTC datetime of the entities as they are being observed and recorded.
    • The dataset's underlying table or view must have ongoing inserts with recently obtained location data of entities being observed or monitored.

    Spatial Studio considers all the different dataset rows of the same entity id as entries representing the entity with different TIMESTAMP values. However, they may or may not have varying location coordinates or geometries. Hence, these live spatiotemporal datasets can again be classified as shown:

    • Moving Objects: For each entity, if the location or geometry change with changing TIMESTAMP values, then these datasets are called moving objects datasets. In this case, a trail layer (if it is a qualifying geometry) gets added, which shows the trajectory of the moving object as a line string by fetching data for last N seconds (or higher time unit).
    • Non-Moving Objects: For each entity, if only certain properties change (and not the location or geometry) with changing TIMESTAMP, then these are called non-moving objects datasets. In this case, no trail layer gets added as only the properties change with time.
  • Non-Live Spatiotemporal Dataset: A dataset with the following characteristics is known as a Non-Live dataset:
    • The dataset is based on a geometry table or view with a geometry column or pair of latitude/longitude columns.
    • The dataset's underlying table or view contains a TIMESTAMP or DATE type column that contains historic time values.
    These datasets can again be classified as shown:
    • Moving Objects: Similar to a Live dataset, if this dataset contains entities (that uniquely represent an object in the dataset) with varying TIMESTAMP values, then a trail layer gets added. The trail layer shows the trajectory of the moving object as a line string by fetching data for last N seconds (or higher time unit).
    • Non-Moving Objects: In this configuration, the dataset is just treated to have various rows with different TIMESTAMP values (not grouped by any entity id).
  • Time-enabled WMS Dataset: If a WMS Service offers a time dimension for an image layer selected in a WMS dataset, then that WMS Dataset can be configured as spatiotemporal.
  • GeoJSON URL (external) Dataset: These types of datasets can be configured to refresh periodically based on an interval value.

3.6.6.1 Configuring Spatiotemporal for Live Moving Objects Dataset

Perform the following steps to configure spatiotemporal for a live dataset with moving objects. The instructions assume that such a dataset is already existing in your database schema.
  1. Navigate to the Datasets page.
  2. Right-click on the required spatiotemporal dataset and click Properties.
    The Dataset Properties dialog opens.
  3. Click the Spatiotemporal tab.

    The following dialog is displayed:

    Figure 3-24 Enabling Spatiotemporal for a Dataset

    Description of Figure 3-24 follows
    Description of "Figure 3-24 Enabling Spatiotemporal for a Dataset"
  4. Switch ON Enable Spatiotemporal.
  5. Select the Timestamp (or Date) Column.
    • Both date-type and timestamp-type columns are supported.
    • If using a timestamp-type column, then note that Spatial Studio supports only UTC (Coordinated Universal Time) or GMT (Greenwich Mean Time) time zone for visualizing moving objects.
  6. Switch ON Data is live.
  7. Switch ON Moving objects.
  8. Select the Entity ID Column that identifies a set of unique entities.
    The Entity ID Column is not a unique column as each entity can have many recordings of its locations in the same table.
  9. Specify Data Change Rate to indicate the approximate frequency of the live feed updates in the table.
  10. Optionally, select the Altitude Column for Cesium Map Visualization only.
  11. Click Apply.
Your dataset is now enabled for spatiotemporal data visualization.

3.6.6.2 Configuring Spatiotemporal for Live and Non-Moving Objects Dataset

Perform the following steps to configure spatiotemporal for a dataset containing live real-time data on non-moving objects. Although the data attributes of the different entities can vary with time, the entity locations do not change. The instructions assume that such a dataset is already existing in your database schema.
  1. Navigate to the Datasets page.
  2. Right-click on the required spatiotemporal dataset and click Properties.
    The Dataset Properties dialog opens.
  3. Click the Spatiotemporal tab.
  4. Switch ON Enable Spatiotemporal.
  5. Select the Timestamp (or Date) Column.
    • Both date-type and timestamp-type columns are supported.
    • If using a timestamp-type column, then note that Spatial Studio supports only UTC (Coordinated Universal Time) or GMT (Greenwich Mean Time) time zone for visualizing moving objects.
  6. Switch ON Data is live.
  7. Switch OFF Moving objects.
  8. Select the Entity ID Column that identifies a set of unique entities.
    The Entity ID Column is not a unique column as each entity can have many recordings of its locations in the same table.
  9. Specify Data Change Rate to indicate the approximate frequency of the live feed updates in the table.
  10. Optionally, select the Altitude Column for Cesium Map Visualization only.
  11. Click Apply.
Your dataset is now enabled for spatiotemporal data visualization.

3.6.6.3 Configuring Spatiotemporal for Non-Live Moving Objects Dataset

Perform the following steps to configure spatiotemporal for a dataset containing non-live data on moving objects. The instructions assume that such a dataset is already existing in your database schema.
  1. Navigate to the Datasets page.
  2. Right-click on the required spatiotemporal dataset and click Properties.
    The Dataset Properties dialog opens.
  3. Click the Spatiotemporal tab.

    The following dialog is displayed:

    Figure 3-25 Enabling Spatiotemporal for Historical Data

    Description of Figure 3-25 follows
    Description of "Figure 3-25 Enabling Spatiotemporal for Historical Data"
  4. Switch ON Enable Spatiotemporal.
  5. Select the Timestamp (or Date) Column.
    • Both date-type and timestamp-type columns are supported.
    • If using a timestamp-type column, then note that Spatial Studio supports only UTC (Coordinated Universal Time) or GMT (Greenwich Mean Time) time zone for visualizing moving objects.
  6. Switch OFF Data is live.
  7. Switch ON Moving objects.
  8. Select the Entity ID Column that identifies a set of unique entities.
    The Entity ID Column is not a unique column as each entity can have many recordings of its locations in the same table.
  9. Select the Time Unit.
  10. Click Apply.
Your dataset is now enabled for spatiotemporal data visualization.

3.6.6.4 Configuring Spatiotemporal for Non-Live and Non-Moving Objects Dataset

Perform the following steps to configure spatiotemporal for a dataset containing non-moving objects with different timestamp values. The instructions assume that such a dataset is already existing in your database schema.
  1. Navigate to the Datasets page.
  2. Right-click on the required spatiotemporal dataset and click Properties.
    The Dataset Properties dialog opens.
  3. Click the Spatiotemporal tab.

    The following dialog is displayed:

    Figure 3-26 Enabling Spatiotemporal for Standard Filtering Datasets

    Description of Figure 3-26 follows
    Description of "Figure 3-26 Enabling Spatiotemporal for Standard Filtering Datasets"
  4. Switch ON Enable Spatiotemporal.
  5. Select the Timestamp (or Date) Column.
    • Both date-type and timestamp-type columns are supported.
    • If using a timestamp-type column, then note that Spatial Studio supports only UTC (Coordinated Universal Time) or GMT (Greenwich Mean Time) time zone for visualizing moving objects.
  6. Switch OFF Data is live.
  7. Switch OFF Moving objects.
  8. Select the Time Unit.
    The data will be filtered as per the selected time unit.

    Also, note that the filtering is applied at the dataset level. This implies that all the layers created out of this dataset will have the same filtering when added to the timeline.

  9. Click Apply.
Your dataset is now enabled for spatiotemporal data visualization.

3.6.6.5 Configuring Spatiotemporal for OGC WMS Datasets

Perform the following steps to configure spatiotemporal for an OGC WMS dataset.
  1. Navigate to the Datasets page.
  2. Right-click on the required OGC WMS dataset and click Properties.
    The Dataset Properties dialog opens.
  3. Click the Spatiotemporal tab.

    The following dialog is displayed:

    Figure 3-27 Enabling Spatiotemporal for OGC WMS Dataset

    Description of Figure 3-27 follows
    Description of "Figure 3-27 Enabling Spatiotemporal for OGC WMS Dataset"
  4. Switch ON Enable Spatiotemporal.
  5. Click Apply.
Your dataset is now enabled for spatiotemporal data visualization.

3.6.6.6 Configuring Spatiotemporal for GeoJSON URL Datasets

Perform the following steps to configure spatiotemporal for a GeoJSON URL based dataset.
  1. Navigate to the Datasets page.
  2. Right-click on the required GeoJSON URL dataset and click Properties.
    The Dataset Properties dialog opens.
  3. Click the Spatiotemporal tab.
  4. Switch ON Enable Spatiotemporal.
  5. Click Apply.
Your dataset is now enabled for spatiotemporal data visualization. Also, note that the dataset will be considered Live by default.

3.6.7 Preparing a Non-Spatial Dataset for Analysis

Spatial Studio allows you to prepare a non-spatial dataset for mapping and analysis by joining to a spatial dataset.

Note the following highlights about joining two datasets:

  • You can only join a non-spatial dataset to a spatial dataset and not conversely.
  • It is essential that the non-spatial data in one dataset is linked to the spatial data in the other dataset through a common primary key column.
  • You can choose the columns for the newly created joined dataset from the attributes of the datasets associated in the join operation.
The instructions assume that a spatial dataset and a non-spatial dataset having a common primary key data is already existing in your database schema.
  1. Navigate to the Datasets page.
  2. Right-click on the non-spatial dataset which you want to join to a spatial dataset.
  3. Select Join to Spatial Dataset from the Prepare context menu.
    The following window opens:

    Figure 3-28 Joining to a Spatial Dataset

    Description of Figure 3-28 follows
    Description of "Figure 3-28 Joining to a Spatial Dataset"
  4. Optionally, enter a dataset name for Name of join result dataset.
  5. Select the Spatial dataset for the join.
    On selection, the primary key associated with the spatial dataset is validated against the non-spatial dataset key. If the datasets key values are not suitable for a join operation, then the following error is displayed:
    Dataset key columns to join must be the same data type
  6. Optionally, select the required columns for the joined result dataset from the non-spatial and spatial datasets.
  7. Click OK.

    The joined dataset is created and it appears as a row on the Datasets Page. This dataset will contain all the column properties selected from both the spatial and non-spatial datasets. You can verify the properties of the joined dataset both in the Dataset Properties window on the Datasets page and when using the dataset for map visualization and analysis on the Active Projects page, as shown:

    Figure 3-29 Appended Non-spatial and Spatial Properties

    Description of Figure 3-29 follows
    Description of "Figure 3-29 Appended Non-spatial and Spatial Properties"

3.6.8 Exporting a Dataset to GeoJSON

You can export a dataset from Spatial Studio to GeoJSON.

It is possible that your dataset can contain multiple geometry columns. In such a case, Spatial Studio allows you to select a specific geometry column for the export operation.
The instructions assume that a dataset containing the coordinates details is already existing in your database schema.
  1. Navigate to the Datasets page.
  2. Right-click on the dataset name which you want to export.
  3. Select Export.
    The dataset Export dialog opens as shown:

    Figure 3-30 Exporting to GeoJSON

    Description of Figure 3-30 follows
    Description of "Figure 3-30 Exporting to GeoJSON"
  4. Select GeoJSON from the File Format drop-down list.
  5. Optionally, increase or decrease the Decimal places in coordinates as required.
  6. Select a geometry column as required.
  7. Select the required columns for the export.
  8. Click OK.
  9. Save the .zip file containing the GeoJSON data on your system.

3.6.9 Updating Statistics for Datasets

The Update statistics feature in Spatial Studio gathers statistics of the dataset columns.

To gather the dataset statistics, right-click on the dataset and select Update statistics. For all datasets (except view-based and spatial analysis datasets), this action triggers a single background job which collects the relevant statistical data. Once the job completes successfully on the Jobs page, you can verify the updated statistical data by viewing the Dataset Properties.

However, for view-based and spatial analysis datasets, gathering statistics is a two-step process. It implies that two background jobs are triggered:
  1. Gather dataset statistics [basic]: This job collects the basic statistics such as Name and DataType of columns in a dataset. When this job completes successfully, the job in step-2 is triggered.
  2. Gather dataset statistics [full]: This job collects more detailed statistics such as Minimum Value, Maximum Value, Bounding Box, and unique column values. As long as this job is in the Processing status, the view-based dataset may show incomplete information for the Minimum Value and Maximum Value columns in the Dataset Properties dialog:

    Figure 3-31 Gathering Statistics In Progress

    Description of Figure 3-31 follows
    Description of "Figure 3-31 Gathering Statistics In Progress"

    Once the job status is Done, the Dataset Properties reflects the gathered statistics.

    Figure 3-32 Displaying Gathered Statistics

    Description of Figure 3-32 follows
    Description of "Figure 3-32 Displaying Gathered Statistics"

Note that for any type of dataset, you must always ensure that this background job completes successfully before performing advanced styling or visualization of a dataset.

3.6.10 About Cache in Spatial Studio

Starting with Spatial Studio release 22.3, all vector tiles generated for all datasets are cached to the file system by default.

This cache process automatically begins when the you first load a dataset for map visualization and start panning the map or zoom in and out on the map. Therefore, the next time the same dataset is visualized, all the corresponding map layers load faster as the relevant tiles have been already generated and are ready to be loaded. All these generated vector tiles will be saved under:

<user_home_folder>/.sgtech/cache/CACHE_<cache_id>

The <cache_id> which is part of the folder name is an integer value, calculated based on the dataset id and the geometry column being encoded in the vector tiles. A metadata file will be saved inside each cache folder to provide human-readable information about where the tiles belong to in a tiles.json file. A sample structure of the metadata file is as shown:

{
  "DatasetName" : "DATASET NAME",
  "DatasetId" : "8da55629d3ca71aa37d859422a847257",
  "GeometryColumn" : "GEOM_COL_NAME"
}

Each vector tile will be encoded and saved to a file that follows a name pattern as shown:

<zoom_level>_<x_axis>_<y_axis>.dat

All the variables in the preceding name pattern are replaced by an integer and denote the world position where the tile needs to be loaded when looking at a certain viewport of the world map.

The cache options (Pre-cache and Purge cache) for a dataset can be accessed from the Datasets page as shown:

Figure 3-33 Dataset Cache Options

Description of Figure 3-33 follows
Description of "Figure 3-33 Dataset Cache Options"

3.6.10.1 Pre-Cache

You can trigger a pre-caching task to start generating vector tiles even before a map is loaded with the dataset for visualization.

See Figure 3-33 to access the Pre-cache option.

Pre-caching can infer where the data is located and suggest the data bounds for caching. In case if the information is not available, then you can interactively select the part of the world that needs to be included in the pre-caching task. Spatial Studio also suggests the zoom levels that are best suited for the data. However, you can always override this and configure your own choice for the Zoom levels.

Figure 3-34 Configuring Zoom Levels for Pre-Caching Task

Description of Figure 3-34 follows
Description of "Figure 3-34 Configuring Zoom Levels for Pre-Caching Task"

Note:

Based on the complexity of the data and the number of zoom levels to pre-cache, this task could take from a couple of minutes to several hours. Therefore, be cautious on what you opt to include in this process as the database connections and CPU usage could heavily be impacted by this task.

The pre-cached tiles are saved in the file system, following the name pattern discussed in the earlier section. Extra information about the bounding rectangle and zoom levels that were pre-cached are included in the tiles.json file as shown:

{
  "DatasetName" : "DATASET NAME",
  "DatasetId" : "8da55629d3ca71aa37d859422a847257",
  "GeometryColumn" : "GEOM_COL_NAME",
  "ZoomLevels" : [ 13, 14, 15 ],
  "BoundingBox" : [ -103.455841, 20.708551, -103.421479, 20.73044 ]
}

3.6.10.2 Purge Cache

You can wipe the cached tiles by calling the Purge cache option.

See Figure 3-33 to access the Purge cache option.

This option is helpful whenever the database data changes causing the already generated vector tiles to become stale.

Alternatively, you can also select the Refresh layer option for each dataset layer that is added to the map visualization in the Active Project page as shown:

Figure 3-35 Refresh Map Data Layer

Description of Figure 3-35 follows
Description of "Figure 3-35 Refresh Map Data Layer"

This indirectly triggers a Purge cache operation, before generating the vector tiles again.

You must perform a cache purge or layer refresh whenever you apply any of the following changes to a dataset:

  • Change the key column of a dataset
  • Enable or disable columns of a dataset
  • Change the contents of your dataset's source table

Otherwise, you will be viewing stale data on the map and interacting with this data may also result in errors.