1 Introduction to Oracle Spatial Studio

Oracle Spatial Studio is a graphical tool for working with spatial data in Oracle Spatial and Graph format.

1.1 About Oracle Spatial Studio

Oracle Spatial Studio, also referred to as Spatial Studio, is a free tool that lets you connect with, visualize, explore, and analyze geospatial data stored in and managed by Oracle Spatial and Graph.

Spatial Studio is a multiuser Java EE application that can be used as a standalone tool (Quick Start) or deployed to WebLogic Server.

Before you can use Spatial Studio, you must download the kit from Oracle Technical Resources (formerly called Oracle Technology Network), install the software, and perform certain administrative actions like creating database users that are authorized to use the tool, and managing those users.

Note:

Spatial Studio is not the Spatial and Graph map visualization component (formerly called "MapViewer"), which is not an end-user "tool" but rather a separate and distinct component.

The map visualization component is documented in Oracle Spatial and Graph Map Visualization Guide.

1.2 Spatial Studio Terminology

The key concepts and domain objects of Oracle Spatial Studio are the following.

  • Connection: Connections are user-created; they provide details so that the Spatial Studio can load user data from an external data source, typically a specific database schema.
  • Dataset: A dataset is the basic organizational unit of a user’s data.
  • Project: A project is where data visualization and analysis occur. It represents a “workspace” that can be saved and reopened.
  • Published Project: A published project is a snapshot of the visualizations and analyses that a user has created in a project. It provides an easy way of sharing what users have created within their organization.
  • Analysis: An analysis is typically one or more (spatial) operations performed on one or more datasets. The operation types and their parameters for an analysis are all stored as part of a project. The result of any analysis can be visualized, just like any other dataset.
  • Metadata schema (repository): The metadata schema for Spatial Studio is an Oracle Database that contains the repository where all Spatial Studio metadata is centrally managed.
  • User: Spatial Studio’s end users, which are typically business analysts and administrative users. These users are NOT database schema owners; rather they are application users, whose information is typically stored in an LDAP-like directory and whose authentication is carried out by WebLogic Server.
  • Public Dataset: A public dataset is one with a GeoJSON endpoint that can be accessed without having to log onto the Spatial Studio first. A public dataset is always visible to all the Spatial Studio users and can be used in their projects.
  • Public Published Project (PPP): A public published project is a published project where all the datasets involved are public datasets. You can embed the visualizations of a public published project in other web applications, or can be viewed standalone in a web browser, without having to log onto Spatial Studio server first.

1.3 Spatial Studio Metadata and Connection Management

Spatial Studio stores all of its own metadata (such as the definitions of all the datasets and connections created by different users) in a single Oracle Database schema known as the metadata schema, or repository.

This metadata schema is one that Spatial Studio must be able to connect to during initial startup, because all of its essential metadata and states are stored there. This metadata schema can be an Oracle Database devoted solely to Spatial Studio use, or it can be any schema potentially used for other purposes as well, as long as the schema is provisioned for use by Spatial Studio, with the minimum necessary privileges.

The main types of connections are created by Spatial Studio’s end users so that they can gain access to a set of data tables stored in potentially several different database schemas, and explore them together in a single project. For each such user-created connection, only its connection details are stored in Spatial Studio’s metadata schema, while no actual (raw) data is ever copied or extracted into the metadata schema.

If a schema user name and password are specified when a connection is created in Spatial Studio, this information is securely encrypted before being stored in the metadata schema tables. When a user opens a project that depends on datasets originated from such a connection, then the password is decrypted at that time and a new JDBC connection pool is established. This connection pool is then used by Spatial Studio to run queries against the target table(s) from that connection whenever needed.

By default a connection is private, meaning that only the user that created the connection can access it (either in a project or anywhere else). For example, if User A creates a connection, then User B will not be able to see or use that connection or any data from the connection. The only exception is if User B is an admin user, in which case all connections and datasets are fully accessible by User B.

1.4 Spatial Studio Best Practices

The following are recommended practices for use with Spatial Studio.

Standardize Longitude/Latitude Data on SRID 4326

In Oracle Database, spatial data includes a SRID (spatial reference identifier), which uniquely identifies the coordinate system associated with the data. If you want to perform any spatial analysis operations involving multiple data sets, it is recommended that the data sets have the same SRID.

Many SRIDs can be used for longitude/latitude data, but probably the most widely used is 4326. Oracle recommends that you use SRID 4326 for longitude/latitude geometries unless there is information to indicate otherwise. Also, if you have Oracle tables with longitude/latitude geometries and if the SRID is not consistent across the tables, you are advised to standardize on SRID 4326.

(For detailed information about SRIDs and coordinate system support in Oracle Spatial, see the Coordinate Systems (Spatial Reference Systems) chapter in the Spatial manual.)

The following example transforms geometries that do not use SRID 4326 so that they use SRID 4326. You would need to do these actions for each existing table that does not use SRID 4326. The example assumes a geometry table named TABLE_1 with a geometry column named GEOM. It also drops the existing spatial index named table_1_idx, and later re-creates it.

-- Drop the existing spatial index.
DROP INDEX table_1_idx FORCE;

-- Update the spatial metadata.
INSERT INTO user_sdo_geom_metadata
  VALUES (
  'TABLE_1',  -- table name
  'GEOM',     -- geometry column name
  SDO_DIM_ARRAY(
    SDO_DIM_ELEMENT('Longitude', -180, 180, 0.05),  -- 0.05 meter tolerance
    SDO_DIM_ELEMENT('Latitude', -90, 90, 0.05)  -- 0.05 meter tolerance
     ),
  4326   -- SRID for 'Longitude / Latitude (WGS 84)' coordinate system
);

-- Update (transform) geometry data to use SRID 4326.
update table_1 set geom = sdo_cs.transform(geom, 4326);

-- Re-create the spatial index.
CREATE INDEX table_1_idx
ON table_1(geom)
INDEXTYPE IS MDSYS.SPATIAL_INDEX_V2;

Note:

In the CREATE INDEX statement, SPATIAL_INDEX_V2 is recommended if the Oracle Database is Release 18 or later. If it is earlier than Release 18, specify just SPATIAL_INDEX.