rwlogo

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
List of all members | Static Public Member Functions | Friends
IlvObjectSDOUtil Class Reference

Utility class for basic tasks on Oracle SDO Object Model (Oracle Spatial). More...

#include <ilviews/maps/format/oracle/objectmodel/8iutil.h>

Static Public Member Functions

static IlBoolean CheckLayerExistence (IldDbms *dbms, const char *layerName, IlvMapsError &status)
 Checks whether the specified layer exists. More...
 
static IlBoolean CheckMetadataTableExistence (IldDbms *dbms, const char *ownerName, IlvMapsError &status)
 Checks that the [USER_]SDO_GEOM_METADATA table exists. More...
 
static IlBoolean CheckTableExistence (IldDbms *dbms, const char *layerName, IlvMapsError &status)
 Checks whether the specified table exists. More...
 
static void DropLayer (IldDbms *dbms, const char *layerName, IlvMapsError &status)
 Removes the specified layer from database. This method drops the table corresponding to specified layer, and then deletes its entry in the SDO_GEOM_METADATA, in the schema of the table owner. More...
 
static char ** GetAllLayers (IlUShort &layersCount, IldDbms *dbms, const char *ownerName, IlBoolean concatenateGeometryName, IlvMapsError &status)
 Returns a string array made up of all the available SDO layers for the given owner name. More...
 
static IlInt GetGeometriesCount (IldDbms *dbms, const char *tableName, IlvMapsError &status)
 Returns the number of geometries contained in the tableName table. More...
 
static void GetLayerExtent (IldDbms *dbms, const char *layerName, const char *geometryColumnName, const char *xDimensionName, const char *yDimensionName, IlBoolean useExtentOf, IlvCoordinate &upperLeftCorner, IlvCoordinate &lowerRightCorner, IlvMapsError &status)
 Computes the extent (the global bounding box of all geometries) of an SDO layer. More...
 
static IldRequest * GetRequestFromRect (IldDbms *dbms, const char *layerName, const char *geometryName, const IlvCoordinate &upperLeft, const IlvCoordinate &lowerRight, IlvMapsError &status)
 Returns an IldRequest corresponding to the rectangle defined by its upper left and lower right corners. More...
 
static IlvMapsError NoMetaDataError ()
 An IlvMapError indicating that there is no entry concerning the SDO layer in the [USER_]SDO_GEOM_METADATA table. More...
 

Friends

class IlvDefaultObjectSDOTileLoader
 
class IlvObjectSDOLayer
 
class IlvObjectSDOWriter
 

Detailed Description

Utility class for basic tasks on Oracle SDO Object Model (Oracle Spatial).

Library: ilvdbmaps

You can also use the IlvSDOUtil class in order to do some non Object Model specific tasks (for instance, all the tracing methods, error reporting methods, .... of IlvSDOUtil can be used in the Object Model under Oracle 9i).

Member Function Documentation

static IlBoolean IlvObjectSDOUtil::CheckLayerExistence ( IldDbms *  dbms,
const char *  layerName,
IlvMapsError &  status 
)
static

Checks whether the specified layer exists.

A layer exists if its corresponding table exists and if the table is referenced in the SDO_GEOM_METADATA table, in the specified user's schema.

Parameters
dbmsThe IldDbms connection to Oracle.
layerNameThe name of the SDO layer.
statusThe error status raised by this function call.
Returns
IlTrue if the specified layer exists, IlFalse otherwise.
static IlBoolean IlvObjectSDOUtil::CheckMetadataTableExistence ( IldDbms *  dbms,
const char *  ownerName,
IlvMapsError &  status 
)
static

Checks that the [USER_]SDO_GEOM_METADATA table exists.

Parameters
dbmsThe IldDbms connection to Oracle.
ownerNameThe Oracle owner of the layer table in the database.
statusThe error status raised by this function call.
Returns
IlTrue if the metadata exists, IlFalse otherwise.
static IlBoolean IlvObjectSDOUtil::CheckTableExistence ( IldDbms *  dbms,
const char *  layerName,
IlvMapsError &  status 
)
static

Checks whether the specified table exists.

The name of the owner in the database can be specified through the layerName: "OwnerName.LayerName".

Parameters
dbmsThe IldDbms connection to Oracle.
layerNameThe SDO table name.
statusThe error status raised by this function call.
Returns
IlTrue if the specified table exists, IlFalse otherwise.
static void IlvObjectSDOUtil::DropLayer ( IldDbms *  dbms,
const char *  layerName,
IlvMapsError &  status 
)
static

Removes the specified layer from database. This method drops the table corresponding to specified layer, and then deletes its entry in the SDO_GEOM_METADATA, in the schema of the table owner.

Parameters
dbmsThe IldDbms connection to Oracle.
layerNameThe SDO table name.
statusThe error status raised by this function call.
static char** IlvObjectSDOUtil::GetAllLayers ( IlUShort layersCount,
IldDbms *  dbms,
const char *  ownerName,
IlBoolean  concatenateGeometryName,
IlvMapsError &  status 
)
static

Returns a string array made up of all the available SDO layers for the given owner name.

It's your responsibility to delete the returned array of char* by using the operator delete [].

Parameters
layersCountThe number of available SDO layers.
dbmsThe IldDbms connection to Oracle.
ownerNameThe Oracle owner of the layer table in the database.
concatenateGeometryNameIf set to IlTrue, the method will concatenate the name of the Geometry column to the name of the layer. For instance if an SDO layer ROADS has its geometry column called GEOMETRY, then the method will return ROADS.GEOMETRY.
statusThe error status raised by this function call.
Returns
A string array made up of all the available SDO layers.
static IlInt IlvObjectSDOUtil::GetGeometriesCount ( IldDbms *  dbms,
const char *  tableName,
IlvMapsError &  status 
)
static

Returns the number of geometries contained in the tableName table.

Parameters
dbmsThe IldDbms connection to Oracle.
tableNameThe SDO table name.
statusThe error status raised by this function call.
Returns
The number of geometries contained in the tableName table.
static void IlvObjectSDOUtil::GetLayerExtent ( IldDbms *  dbms,
const char *  layerName,
const char *  geometryColumnName,
const char *  xDimensionName,
const char *  yDimensionName,
IlBoolean  useExtentOf,
IlvCoordinate upperLeftCorner,
IlvCoordinate lowerRightCorner,
IlvMapsError &  status 
)
static

Computes the extent (the global bounding box of all geometries) of an SDO layer.

This method can be used in order to compute the size of an IlvObjectSDOLayer. Note that the owner name is mandatory and must be given through the layerName: "OwnerName.LayerName". This function has two strategies to compute the layer extent:

  • The function uses SDO_TUNE.EXTENT_OF in order to get the extent of the layer. In this case, the call to this function can be (very) time consuming depending on the kind and number of geometries contained in the layer.
  • The function looks at the geometry metadata table in order to extract the min and max values of the x- and y-ordinates.

If the x- and y-dimension names are set to 0, they are defaulted to be the first ordinate and the second ordinate of geometries.

Parameters
dbmsThe IldDbms connection to Oracle.
layerNameThe name of the layer. The name of the owner in the database must be specified through the layerName: "OwnerName.LayerName".
geometryColumnNameThe name of the column containing geometries.
xDimensionNameThe name of the x-dimension. If set to 0, the index of the x-dimension in the metadata table (in the SDO_DIM_ARRAY) will be considered as 0.
yDimensionNameThe name of the y-dimension. If set to 0, the index of the y-dimension in the metadata table (in the SDO_DIM_ARRAY) will be considered as 1.
useExtentOfIf set to IlTrue, the function uses SDO_TUNE.EXTENT_OF, otherwise the function uses the geometry metadata table.
upperLeftCornerThe upper left corner of the extent (manager coordinate system).
lowerRightCornerThe lower right corner or the extent (manager coordinate system).
statusThe error status raised by this function call.
static IldRequest* IlvObjectSDOUtil::GetRequestFromRect ( IldDbms *  dbms,
const char *  layerName,
const char *  geometryName,
const IlvCoordinate upperLeft,
const IlvCoordinate lowerRight,
IlvMapsError &  status 
)
static

Returns an IldRequest corresponding to the rectangle defined by its upper left and lower right corners.

This IldRequest contains the SQL query correponding to an SDO filter using a rectangle. It's useful for the IlvObjectSDOFeatureIterator class where you simply want to extract data (from an SDO layer) contained in a rectangular area.

Parameters
dbmsThe IldDbms connection to Oracle.
layerNameThe SDO table name. The name of the owner in the database can be specified through the layerName: "OwnerName.LayerName".
geometryNameThe name of the geometry column of the SDO layer.
upperLeftThe upper left corner of the rectangle.
lowerRightThe lower right corner of the rectangle.
statusThe error status raised by this function call.
Returns
An IldRequest corresponding to the specified rectangle.
static IlvMapsError IlvObjectSDOUtil::NoMetaDataError ( )
static

An IlvMapError indicating that there is no entry concerning the SDO layer in the [USER_]SDO_GEOM_METADATA table.

Returns
An IlvMapsError indicating that there is no entry concerning the SDO layer in the [USER_]SDO_GEOM_METADATA table.

© Copyright 2015, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.