Utility class for basic tasks on Oracle SDO Object Model (Oracle Spatial).
More...
#include <ilviews/maps/format/oracle/objectmodel/8iutil.h>
|
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...
|
|
|
class | IlvDefaultObjectSDOTileLoader |
|
class | IlvObjectSDOLayer |
|
class | IlvObjectSDOWriter |
|
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).
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
-
dbms | The IldDbms connection to Oracle. |
layerName | The name of the SDO layer. |
status | The 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
-
dbms | The IldDbms connection to Oracle. |
ownerName | The Oracle owner of the layer table in the database. |
status | The 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
-
dbms | The IldDbms connection to Oracle. |
layerName | The SDO table name. |
status | The 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
-
dbms | The IldDbms connection to Oracle. |
layerName | The SDO table name. |
status | The 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
-
layersCount | The number of available SDO layers. |
dbms | The IldDbms connection to Oracle. |
ownerName | The Oracle owner of the layer table in the database. |
concatenateGeometryName | If 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. |
status | The 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
-
dbms | The IldDbms connection to Oracle. |
tableName | The SDO table name. |
status | The 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
-
dbms | The IldDbms connection to Oracle. |
layerName | The name of the layer. The name of the owner in the database must be specified through the layerName: "OwnerName.LayerName". |
geometryColumnName | The name of the column containing geometries. |
xDimensionName | The 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 . |
yDimensionName | The 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 . |
useExtentOf | If set to IlTrue , the function uses SDO_TUNE.EXTENT_OF, otherwise the function uses the geometry metadata table. |
upperLeftCorner | The upper left corner of the extent (manager coordinate system). |
lowerRightCorner | The lower right corner or the extent (manager coordinate system). |
status | The 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
-
dbms | The IldDbms connection to Oracle. |
layerName | The SDO table name. The name of the owner in the database can be specified through the layerName: "OwnerName.LayerName". |
geometryName | The name of the geometry column of the SDO layer. |
upperLeft | The upper left corner of the rectangle. |
lowerRight | The lower right corner of the rectangle. |
status | The 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 2016, 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.