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
  • By uploading imagery file on the Spatial Studio server

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 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-12 Select the Data Source

    Description of Figure 3-12 follows
    Description of "Figure 3-12 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 Loading Raster Images into Oracle Spatial GeoRaster

You can upload raster data files, such as remote sensing images and digital elevation models, into Oracle Spatial GeoRaster database using Spatial Studio. Optionally, you can create a GeoRaster dataset using this uploaded data.

See Spatial GeoRaster Developer's Guide for more information on Oracle GeoRaster feature.

Note:

Loading raster images into Oracle Spatial GeoRaster is not supported for Spatial Studio deployed on macOS.

Spatial Studio provides a wizard based on an Extract, Transform, and Load (ETL) process for creating Oracle GeoRaster objects from geospatial imageries.

3.6.1.2.1 Prerequisites for Uploading Raster Files Using Spatial Studio

Learn the prerequisite tasks required for uploading raster data to Oracle Database.

  1. Verify that Oracle Instant Client and GDAL SDK are configured correctly in Spatial Studio deployed to Linux or Windows OS.
    Note that the GDAL SDK depends on the Oracle Instant Client when making connections to Oracle database.

    See Viewing GDAL Installation Info to review and verify GDAL SDK and Oracle Instant Client installations

    .

    Note:

    The Oracle-tested GDAL library is installed automatically on Spatial Studio deployed to Linux or Windows OS in the file path <USER_HOME>/.sgtech/tools/gdal, where <USER_HOME> is the home directory of the operating system user.

    If you need to install Oracle Instant Client then:

    1. Go to the Oracle Instant Client Downloads page.
    2. Download the 64-bit Instant Client zip file (Basic Package (ZIP) or Basic Light Package (ZIP)).
    3. Unzip the downloaded file in <USER_HOME>/.sgtech/tools where <USER_HOME> is the home directory of the operating system user.
      The packages are downloaded in instantclient_<version> folder where version is the version of the Instant Client.
    4. Rename the folder name from instantclient_<version> to instantclient.
  2. Verify the following connection requirements in Spatial Studio.
    1. Create a connection to Oracle Database or Oracle Autonomous Database (see Spatial Studio Connections Page).
      It is important to note that this must be a non-metadata repository connection. You can upload raster images only to a non-metadata repository schema.
    2. Enable GeoRaster for the database schema (see Enabling GeoRaster at the Schema Level).
  3. Obtain the georeference information of the raster data to be uploaded.

    A raster data file's georeference information may fall into one of the following scenarios:

    • The georeference information is self-contained in the raster data file itself, and its spatial reference system (or SRID) is recognized and supported by Oracle database.
    • The raster data file has a companion world-file containing the required parameters, and SRID is known. You can then provide this SRID and the world-file's content.
    • The raster image is georectified, and the SRID and bounding box values are known. You can then provide the SRID, and the data file's upper-right and lower-left corners' coordinates.
  4. Copy the raster files to the Spatial Studio server and ensure you have the required file reading privileges.
  5. Obtain a fileset token from the Spatial Studio administrator.
    If you are a non-administrator user, then you can request the Spatial Studio administrator to provide the required fileset token. See Generating a Fileset Token for more information.

3.6.1.2.2 Using the GeoRaster Dataset Creation Wizard

You can upload raster images into Oracle Spatial GeoRaster database using the GeoRaster dataset creation wizard.

Before uploading a raster file, ensure you meet the prerequisites described in Prerequisites for Uploading Raster Files Using Spatial Studio.

Perform the following steps to access and use the GeoRaster dataset creation wizard:
  1. Navigate to the Datasets page.
  2. Click Create Dataset.
    The Create Dataset window opens.
  3. Select the Imagery file on server option.

    Figure 3-13 Upload Imagery Data Configuration



  4. Enter the Fileset token.
  5. Enter the Relative file path for the imagery files on the server.
  6. Click Create.
    The GeoRaster dataset creation workflow opens and the Raster file info step is displayed as shown:


    Description of geo_raster_workflow_1.png follows
    Description of the illustration geo_raster_workflow_1.png

    Spatial Studio runs the gdalinfo command (from GDAL package) at the backend and the command output is displayed in Output from gdalinfo command line. The command retrieves the basic metadata about the raster data file. You can check and view the imagery information at this step. This includes details such as the imagery dimensions, number of bands, image pixel storage structure, georeference information if applicable, and so on.

    If errors are reported in Output from gdalinfo command line, then you need to exit the current uploading process and first resolve the reported issues. Issues are commonly related to improper configuration of GDAL SDK and Oracle Instant Client packages due to which Spatial Studio cannot find them from the expected file system folders.

  7. Click Next only if no errors are reported in the gdalinfo command output.
    The Dataset creation parameters step is displayed as shown:

    Figure 3-14 Dataset creation parameters



  8. Optionally, switch ON the Create GeoRaster dataset toggle.
    When this option is switched OFF, only the raster file will be uploaded to the database, and the GeoRaster dataset will not be created in Spatial Studio. You can then later create the GeoRaster dataset from the database as more options are available for a database-based GeoRaster dataset. See Creating a GeoRaster Dataset for more information.
  9. Enter the Raster dataset name and Dataset description.
  10. Click Next.
    The GeoRaster parameters step is displayed as shown:

    Figure 3-15 GeoRaster parameters



  11. Select a connection object using the Upload GeoRaster to connection drop-down to store the raster data.
  12. Enter the New GeoRaster table name.
    The GeoRaster table has the following hard-coded columns:
    1. IMAGE_KEY: The key column name of type NUMBER.
    2. DESCRIPTION: The description column name of type VARCHAR2.
    3. GEOR_OBJ: The GeoRaster column name of type SDO_GEORASTER.
  13. Enter the New raster data table name.

    The raster data table has a Raster Id column of type NUMBER.

  14. Enter Key value and Description for the GeoRaster table.
  15. Enter Raster Id for the raster data table.
  16. Click Next.
    The GeoReference parameters step is displayed.

    The uploaded raster must have known georeference information in order to be stored in Oracle database and then be displayed in Spatial Studio.

  17. Select a value from the Select a geo-reference option drop-down.

    The options for this drop-down can vary depending on the spatial reference system (SRS) detected by Spatial Studio in the metadata of the raster file. The supported scenarios are:

    • Scenario 1: Self-contained Georeference information in the Raster Image File

      If the raster image has self-contained georeference information (such as a geo-tiff image that contains the georeference details), then the Use raster file's option is automatically applied.

      You may directly accept and utilize this self-contained georeference information, and no other user inputs are needed as shown.

      Figure 3-16 Using Raster File's GeoReference Information



      It is also possible that a valid self-contained georeference information in the raster image happens to be a user-defined coordinate reference system and therefore not supported by Oracle Spatial. In such a case, the GDAL package may import the image into Oracle database but will assign it with an unsupported SRID (for example, a value of 999999 or 0). Although gdal_translate can upload it into Oracle database, Spatial Studio will not be able to generate the required metadata due to the absence of the required georeference information. As a result, this upload process will eventually fail for such a kind of data file.

      If you observe such an error (in the server logs) while uploading, then you must perform the following steps:

      1. Get a valid spatial reference identifier (SRID) that corresponds to the spatial reference system found in the imagery data.

        For this, you can raise a service request with My Oracle Support or refer to Oracle Spatial Developer's Guide for the steps to create a custom SRID.

      2. Repeat all the previous steps (step 1 to step 16) to upload the raster image.
      3. Enable the Override spatial reference system switch in Figure 3-16 for the GeoReference parameters step.

        The raster data file is then treated as not containing georeference information and thus requires you to provide the details.

      4. Follow the steps for Scenario 2 or Scenario 3 as it applies to you.
    • Scenario 2: Georeference information Provided in a World-File

      If the raster image has a companion world-file (for example, raster file sf1.jps has a companion sf1.wld file), and both are stored in the same folder, then select the Enter World-File content georeference option as shown.

      Figure 3-17 Using GeoReference Information From a World-File



      1. Enter raster image srid for geo-referencing: Enter the SRID for the spatial reference system.
      2. Enter the world-file content here: Enter the world file's contents. Note that each parameter takes one line and six parameters occupy six consecutive lines.
    • Scenario 3: Georectified Raster Image with Known Bounding Box Values

      If the raster image is already georectified and you know its SRID and bounding box values, then select the Enter Imagery bounding box coordinates for a Valid SRID georeference option as shown.

      Figure 3-18 Using Georectified Raster Image with Bounding Box Coordinates



      1. Enter raster image srid for geo-referencing: Enter the SRID for the spatial reference system.
      2. Upper-right corner's X, Upper-right corner's Y: Enter the upper-right corner's coordinates.
      3. Lower-left corner's X, Lower-left corner's Y: Enter the lower-left corner's coordinates.
  18. Click Next to provide additional GeoRaster parameters.
    The Additional parameters step is displayed as shown:

    Figure 3-19 Georeference Parameters: Additional Parameters



  19. Optionally, modify the default parameters (if required) to fine tune the GeoRaster storage related parameters.
    If you are aware that there is a special value for raster cells indicating NODATA, then turn on the Provide a value for NODATA switch and provide its value.
  20. Click Next to confirm the inputs.
    You may scroll down the text area and view all the parameters entered or selected in the previous steps. You may choose to go to any earlier steps to modify inputs.
  21. Click OK.
    The server will initiate a backend process to upload the raster data files into the database, and then optionally create a dataset in Spatial Studio. The application displays a task completion notification and you can also verify the same in the Jobs page.

3.6.1.3 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-20 Creating a GeoRaster DataSet

    Description of Figure 3-20 follows
    Description of "Figure 3-20 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. Optionally, enable Wind Animation if the raster image is encoded with velocities in the red (x-axis) and green (y-axis) channels, and you wish to visualize wind animation.
    See About Wind Animation for more information.
  7. Provide the following Data Range values: Min velocity in x axis, Max velocity in x axis, Min velocity in y axis, and Max velocity in y axis only if you enabled Wind Animation in the preceding step.
  8. 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.4 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-21 Creating a Dataset from GeoJSON

    Description of Figure 3-21 follows
    Description of "Figure 3-21 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.5 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-22 Selecting the WMS Layer to Create a WMS Dataset

    Description of Figure 3-22 follows
    Description of "Figure 3-22 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.6 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.6.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-11.
  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-23 Create dataset from shapefile

    Description of Figure 3-23 follows
    Description of "Figure 3-23 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.7 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-24 Creating a Dataset from a File URL

    Description of Figure 3-24 follows
    Description of "Figure 3-24 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.8 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-25 Options for Creating a Cesium Dataset

    Description of Figure 3-25 follows
    Description of "Figure 3-25 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 Console 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.1.9 Creating a Wind Animation Dataset

You can create a wind animation dataset which can be used for visualizing wind speeds and dynamic flow on a map.

As a prerequisite for creating a wind animation dataset, ensure that:

Perform the following steps to create a wind animation dataset:

  1. Navigate to the Datasets page.
  2. Click Create Dataset.
    The Create Dataset window opens.
  3. Click Database table/view, select a Connection and click Create.
  4. Click GeoRasters, select the GeoRaster table containing the base image, and click OK.
    The Geo-raster Configuration dialog opens as shown:

    Figure 3-26 GeoRaster Configuration for Creating a Wind Animation Dataset



  5. Set the Selection Mode to Single Raster.
  6. Switch ON the Wind Animation toggle.
  7. Enter the following Data Range values: Min velocity in x axis, Max velocity in x axis, Min velocity in y axis and Max velocity in y axis.
    Note the following:
    • These values are obtained at the time of generating the base wind image. See Generating a Base Wind Image From a NOAA Dataset for an example.
    • These values need to be set only the first time you create a wind animation dataset from this GeoRaster table. Once saved, these parameters will be stored in the GeoRaster table. Hence, the future datasets will not require manual input of the Data Range values, unless you choose to update them.
  8. Click OK.
    The wind animation dataset gets created and is displayed on the Datasets page.

Related Topics

3.6.1.10 Enabling Wind Animation For an Existing GeoRaster Dataset

You can enable wind animation for an existing GeoRaster dataset only if the raster image is encoded with the red (R) and green (G) channels representing the x and y velocities, respectively.

  1. Navigate to the Datasets page.
  2. Right-click on the required GeoRaster dataset and click Properties.
    The Dataset Properties dialog opens as shown.

    Figure 3-27 Enabling Wind Animation



  3. Click the GeoRaster tab.
  4. Switch ON the Wind Animation toggle.
  5. Optionally, modify the following Data Range values: Min velocity in x axis, Max velocity in x axis, Min velocity in y axis, and Max velocity in y axis.
  6. Click Apply.

Related Topics