Oracle Spatial Features Supported by KeepTool

Published 30. June 2015

Updated October 2025


Introduction

KeepTool supports working with Oracle Spatial objects — for example, points or polygons — provided you are using a database that includes a license for the Oracle Spatial option.


Viewing Spatial Columns

In the OE sample schema, the column CUSTOMERS.CUST_GEO_LOCATION has the data type MDSYS.SDO_GEOMETRY.
This column can be displayed in the Data Content tab as long as you are using a SQL*Net connection rather than a direct TCP/IP connection, because the latter does not support Oracle object types.

Data Content View of CUSTOMERS Table showing the Context Menu for a Spatial Column

Data Content View of CUSTOMERS Table showing the Context Menu for a Spatial Column

Data Content View of CUSTOMERS Table showing the Context Menu for a Spatial ColumnThe grid cells are read-only but show a compact representation of the spatial object.
By clicking the ellipsis button, you can open a dialog that provides a detailed view of the geometry:

Properties Dialog for a Spatial Column

Properties Dialog for a Spatial Column

Here you can see a two-dimensional point in the WGS84 coordinate system.
The lower part of the dialog shows the corresponding SQL literal representation, which can be copied directly into the SQL Scratchpad and executed there.

SQL Query on Spatial Data and SQL Resultset including Context Menu for Spatial Data

SQL Query on Spatial Data and SQL Resultset including Context Menu for Spatial Data

You can also right-click on a cell to create a KML file.
A save dialog appears, and after saving the file, you can open it in an application such as Google Earth to view the spatial point on a map:

Exported KML File has been imported into Google Earth

Exported KML File has been imported into Google Earth

In this example, the yellow pin represents a customer location on an aerial map of Baltimore, Maryland.
To generate KML output for all rows at once, use the grid’s context menu instead of the cell’s.


Importing a Sample Spatial Database

Oracle provides a sample NAVTEQ spatial database that can be downloaded after accepting the license agreement.
The ZIP file contains several scripts and a dump file (about 2 GB).

To import this data:

  1. Create a user named WORLD_SAMPLE and grant unlimited quota on the USERS tablespace.

  2. Make sure that the USERS tablespace data file can autoextend to about 5 GB.

  3. Then import the dump file using:

    imp WORLD_SAMPLE/WORLD_SAMPLE@orcl file=world_sample2010.dmp log=world_sample.log full=y

    KeepTool has successfully tested this import with Oracle 11g R2 and Oracle 12c (pluggable database).

  4. Finally, execute the following statements:

        INSERT INTO user_sdo_maps SELECT * FROM sdo_maps;
        INSERT INTO user_sdo_themes SELECT * FROM sdo_themes;
        INSERT INTO user_sdo_styles SELECT * FROM sdo_styles;
        INSERT INTO user_sdo_cached_maps SELECT * FROM sdo_cached_maps;
        COMMIT;

    KeepTool has tested this import under both Oracle 11g R2 and Oracle 12c pluggable databases.

Importing Spatial Sample Data (WORLD_SAMPLE2010)

Importing Spatial Sample Data (WORLD_SAMPLE2010)


After execution, when you open the table MAP_WORLD in the Data Content browser, you’ll see more complex spatial data (points and polygons):

Afterward, open the table MAP_WORLD in the Data Content view.
You will see polygons and points representing geographic regions.

Detail View of Oracle Spatial Data in Hora's Data Content Grid

Detail View of Oracle Spatial Data in Hora’s Data Content Grid

Detail View of Oracle Spatial Data in Hora’s Data Content GridYou can apply a filter, for example continent = 'Europe', to restrict the data.
Then choose “KML Export” from the context menu to generate a KML file.

Exporting Spatial Data from Hora into a KML File

Exporting Spatial Data from Hora into a KML File

Opening the file in Google Earth displays the polygons of countries.
Clicking on an area shows detailed information, such as the country name and other table attributes — for example, “Germany.”

Display the KML File in Google Earth

Display the KML File in Google Earth


Working with Spatial Columns

When you add a new spatial column to your database, three steps are required:

  1. Create the table column with the data type MDSYS.SDO_GEOMETRY.

  2. Insert a corresponding row into the USER_SDO_GEOM_METADATA view that defines the coordinate system and bounding rectangle.

  3. Create a spatial index on that column.

KeepTool’s Schema → Spatial Columns tab provides an overview of all spatial columns in your schema.
It also shows metadata such as coordinate systems and whether a spatial index exists.

Viewing Coordinate System and Spatial Indexes for Spatial Columns in Hora

Viewing Coordinate System and Spatial Indexes for Spatial Columns in Hora

From the context menu, you can perform additional actions such as:

  • Copy Script Template – creates a SQL script for replicating the spatial column setup on another column (drop index, modify metadata, rebuild index, etc.).

  • KML Export – exports the geometry for visualization, e.g., if the bounding coordinates do not cover the entire world as in the WORLD_SAMPLE example.

  • Create New Spatial Index.

  • Rebuild Existing Spatial Index.

This provides complete support for managing and analyzing Oracle Spatial data directly within KeepTool.


Conclusion

With KeepTool, working with Oracle Spatial data becomes much easier.
From viewing geometry objects and generating KML files to maintaining spatial metadata and indexes — KeepTool gives you a simple, integrated interface for all spatial tasks.


➡️ Try KeepTool for free

KeepTool's Oracle tools are designed specifically for developers, DBAs, and support teams.
Based on over 25 years of experience, we continuously optimize our software to make your database analysis and documentation faster, more efficient, and clearer.