Rogue Wave Views
Maps Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvDefaultObjectSDOTileLoader Class Reference

This class implements an IlvTileLoader to load tiles from Oracle 9i Spatial, using the SDO object model. More...

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

Inheritance diagram for IlvDefaultObjectSDOTileLoader:
IlvSDOTileLoader IlvTileLoader

Public Member Functions

 IlvDefaultObjectSDOTileLoader (const IlvMapAdapter *mapAdapter, IldDbms *dbms, const char *tableName, const char *geometryColumnName, IlDouble tileWidth, IlDouble tileHeight, const char *xDimensionName=0, const char *yDimensionName=0, const char *keyColumnName=0, const IlvCoordinate *upperLeft=0, const IlvCoordinate *lowerRight=0)
 Initializes a new instance of IlvDefaultObjectSDOTileLoader. More...
 
virtual IlvMapsError dbmsRestored ()
 Called by the IlvSDOLayer read from an .ilv file, after the connection to an Oracle SDO database has been restored. More...
 
IlUInt getColArraySize () const
 Returns the DbLink fetch array size parameter passed to the setRequestParameters() method. More...
 
virtual IlvObjectSDOFeatureIteratorgetFeatureIterator (IldRequest *request, const char *geometryColumnName, IlvObjectSDOKeyExtractor *keyExtractor, const char *xDimensionName, const char *yDimensionName, IlvMapsError &error)
 Returns the instance of IlvObjectSDOFeatureIterator that is used by the tile loader. More...
 
const char * getLayerName ()
 Returns the name of the SDO layer of this tile loader.
 
virtual IldRequest * getRequest (IlvTile *tile)
 Returns the request containing the SDO geometries that intersect the specified tile. More...
 
char ** getRequestParameters () const
 Returns the five parameters (a copy of each) of the internal request used for load-on-demand. More...
 
virtual IlvRectgetSize ()
 Returns the bounding box of the data set managed by the tile loader. More...
 
IlUShort getTileGroupingCount () const
 Returns the number of tiles to be loaded in one unique request. More...
 
virtual const IlvRectgetTileOrigin () const
 Returns the origin tile used by the load-on demand mechanism.
 
IlBoolean isClippingRequest () const
 Indicates whether the strict clipping policy is set or not. More...
 
virtual IlvMapsError load (IlvTile *tile)
 Loads a tile. More...
 
void setClippingRequest (IlBoolean set)
 Sets or unsets strict clipping policy. More...
 
virtual IlvMapsError setRequestParameters (const char *selectClause="*", const char *fromClause=0, const char *whereClause=0, const char *spatialOperator="mdsys.sdo_filter", const char *spatialOperatorParams="querytype=window", IlUInt colArraySize=10)
 Sets some parameters in order to tune the request that is used by an IlvTile. More...
 
void setTileGroupingCount (IlUShort nb)
 Sets the number of tiles to be loaded in one unique request. More...
 
- Public Member Functions inherited from IlvSDOTileLoader
IldDbms * getDbms () const
 Returns the IldDbms representing the connection to the Oracle database. More...
 
IlvMapsError getInitStatus () const
 Returns the error code that may have happened during the loader construction. More...
 
virtual IlBoolean isPersistent () const
 Indicates whether this IlvSDOTileLoader is persistent. More...
 
virtual void release (IlvTile *tile)
 Releases the content of a tile when required by the cache of the layer. More...
 
- Public Member Functions inherited from IlvTileLoader
virtual void controllerDeleted (IlvTileController *controller)
 Called when the controller is deleted. More...
 
virtual void tileDeleted (IlvTile *tile)
 Called when a tile is deleted during the controller destruction. More...
 

Additional Inherited Members

- Protected Member Functions inherited from IlvSDOTileLoader
 IlvSDOTileLoader (IldDbms *dbms)
 Initializes a new instance of IlvSDOTileLoader. More...
 
IldRequest * executeQuery (const char *query)
 Executes the specified query and exports a trace if the SQL traces are enabled. More...
 

Detailed Description

This class implements an IlvTileLoader to load tiles from Oracle 9i Spatial, using the SDO object model.

Library: ilvdbmaps

This tile loader is optimized for speed performance thanks to the tile grouping capacity that can be used through the setTileGroupingCount() method.

See also
IlvObjectSDOLayer.

Constructor & Destructor Documentation

§ IlvDefaultObjectSDOTileLoader()

IlvDefaultObjectSDOTileLoader::IlvDefaultObjectSDOTileLoader ( const IlvMapAdapter mapAdapter,
IldDbms *  dbms,
const char *  tableName,
const char *  geometryColumnName,
IlDouble  tileWidth,
IlDouble  tileHeight,
const char *  xDimensionName = 0,
const char *  yDimensionName = 0,
const char *  keyColumnName = 0,
const IlvCoordinate upperLeft = 0,
const IlvCoordinate lowerRight = 0 
)

Initializes a new instance of IlvDefaultObjectSDOTileLoader.

Initializes an instance of IlvDefaultObjectSDOTileLoader to load data from the layer, specified by tableName, the name of the table containing the layer and geometryColumnName, the name of the column containing the geometry.

Parameters
mapAdapterThe map adapter used by the loader.
dbmsThe connection to an Oracle database.
tableNameThe name of the layer table to be loaded.
geometryColumnNameThe name of the geometry column of the layer.

This parameter is useful if the layer has more than one geometry column. If your layer has only one geometry column, just set this parameter to 0.

Parameters
tileWidthThe width of one Load On Demand tile. The width must be given in manager coordinate system (it will be adapted by the map adapter passed as argument).
tileHeightThe height of one Load On Demand tile. The height must be given in manager coordinate system (it will be adapted by the map adapter passed as argument).
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.
keyColumnNameThe name of the column containing an ID considered as a Key for each geometry. If this parameter is set, then the key value extracted from the keyColumnName column is associated to the IlvMapFeature. The interest of this is that a map feature containing a geometry that belongs to multiple tiles will be loaded just once.
upperLeftThe upper left corner of the layer extent (manager coordinate system). If set to 0, the corner is defaulted to the one available in the geometry metadata table.
lowerRightThe lower right corner of the layer extent (manager coordinate system). If set to 0, the corner is defaulted to the one available in the geometry metadata table.
See also
IlvObjectSDOKeyExtractor.

Member Function Documentation

§ dbmsRestored()

virtual IlvMapsError IlvDefaultObjectSDOTileLoader::dbmsRestored ( )
virtual

Called by the IlvSDOLayer read from an .ilv file, after the connection to an Oracle SDO database has been restored.

Returns
An IlvMapsError code.

Reimplemented from IlvSDOTileLoader.

§ getColArraySize()

IlUInt IlvDefaultObjectSDOTileLoader::getColArraySize ( ) const

Returns the DbLink fetch array size parameter passed to the setRequestParameters() method.

The default value is 10.

Returns
The fetch array size value.
See also
setRequestParameters().

§ getFeatureIterator()

virtual IlvObjectSDOFeatureIterator* IlvDefaultObjectSDOTileLoader::getFeatureIterator ( IldRequest *  request,
const char *  geometryColumnName,
IlvObjectSDOKeyExtractor keyExtractor,
const char *  xDimensionName,
const char *  yDimensionName,
IlvMapsError &  error 
)
virtual

Returns the instance of IlvObjectSDOFeatureIterator that is used by the tile loader.

You can override this method in order to use your own feature iterator.

Parameters
requestThe IldRequest from which geometries are read.
geometryColumnNameThe name of the column containing geometries.
keyExtractorThe extractor that can extract featureIDs from the request rows.
xDimensionNameThe name of the X dimension.
yDimensionNameThe name of the Y dimension.
errorThe error that may have been produced by the method.
Returns
The instance of IlvObjectSDOFeatureIterator used by the tile loader.

§ getRequest()

virtual IldRequest* IlvDefaultObjectSDOTileLoader::getRequest ( IlvTile tile)
virtual

Returns the request containing the SDO geometries that intersect the specified tile.

The default implementation returns 0.

Parameters
tileThe tile to be filled with the SDO geometries.
Returns
The IldRequest containing the SDO geometries that intersect the specified tile.
See also
load().

Reimplemented from IlvSDOTileLoader.

§ getRequestParameters()

char** IlvDefaultObjectSDOTileLoader::getRequestParameters ( ) const

Returns the five parameters (a copy of each) of the internal request used for load-on-demand.

It returns them in the same order that the one used in the setRequestParameters() method.

The returned strings are allocated with the new [] operator and should then be deallocated thanks to the delete [] operator.

Returns
The parameters of the internal request used for load-on-demand.
See also
setRequestParameters().

§ getSize()

virtual IlvRect* IlvDefaultObjectSDOTileLoader::getSize ( )
virtual

Returns the bounding box of the data set managed by the tile loader.

If the bounding box cannot be computed, this method can return 0. The IlvSDOLayer using this object will have an undefined size.

The default implementation returns 0.

Returns
The bounding box of the data set managed by the tile loader.

Reimplemented from IlvSDOTileLoader.

§ getTileGroupingCount()

IlUShort IlvDefaultObjectSDOTileLoader::getTileGroupingCount ( ) const

Returns the number of tiles to be loaded in one unique request.

Returns
The number of tiles to be loaded in one unique request..
See also
setTileGroupingCount().

§ isClippingRequest()

IlBoolean IlvDefaultObjectSDOTileLoader::isClippingRequest ( ) const

Indicates whether the strict clipping policy is set or not.

Returns whether the tile loader will perform a strict clipping. When the strict clipping mode is set, the loaded geometries are clipped so that they intersect the bounding box of the IlvTile that has loaded them.

The default behavior of this tile loader is to not perform this strict clipping.

Returns
IlTrue if this tile loader clips strictly the geometries.
See also
setClippingRequest().

§ load()

virtual IlvMapsError IlvDefaultObjectSDOTileLoader::load ( IlvTile tile)
virtual

Loads a tile.

The default implementation does nothing and returns IlvMaps::NoError().

Returns
The resulting error code.

Reimplemented from IlvSDOTileLoader.

§ setClippingRequest()

void IlvDefaultObjectSDOTileLoader::setClippingRequest ( IlBoolean  set)

Sets or unsets strict clipping policy.

Sets whether this tile loader performs a strict clipping. When the strict clipping mode is set, the loaded geometries are clipped so that they intersect the bounding box of the IlvTile that has loaded them.

The default behavior of this tile loader is to not perform this strict clipping.

Parameters
setIf IlTrue, the strict clipping mode is set.
See also
isClippingRequest().

§ setRequestParameters()

virtual IlvMapsError IlvDefaultObjectSDOTileLoader::setRequestParameters ( const char *  selectClause = "*",
const char *  fromClause = 0,
const char *  whereClause = 0,
const char *  spatialOperator = "mdsys.sdo_filter",
const char *  spatialOperatorParams = "querytype=window",
IlUInt  colArraySize = 10 
)
virtual

Sets some parameters in order to tune the request that is used by an IlvTile.

The used request is of type: "select selectClause from fromClause where whereClause and mdsys.spatialOperator (layerName.geometryColumnName, ... ), 'spatialOperatorParams') = 'TRUE'"
For instance, calling the method with the following arguments will lead to a load-on-demand only on geometries, the attributes being ignored (it supposes that the geometry column name is "GEOMETRY"): setRequestParameters("GEOMETRY");
If you do not want to use an argument of the function, set it to 0.

Parameters
selectClauseThe select clause of the request. The default value is "*".
fromClauseThe from clause of the request. The default value is the name of the SDO layer.
whereClauseThe where clause of the request.
spatialOperatorThe spatial operator used in the request. The default value is "mdsys.sdo_filter". For more information about spatial operators, please refer to the User's Manual.
spatialOperatorParamsThe parameters of the spatial operator. The default value is "querytype=window".
colArraySizeThe Db Link fetch array mode is activated. If you pass 0, the parameter is ignored. The value recommended by Oracle is 10.
See also
IldRequest::setColArraySize().

§ setTileGroupingCount()

void IlvDefaultObjectSDOTileLoader::setTileGroupingCount ( IlUShort  nb)

Sets the number of tiles to be loaded in one unique request.

This is particularly useful for the load on demand where you can group a given number of tiles to be loaded together (when for instance the zoom factor is important so that you are visualizing a certain number of tiles at the same time).

Parameters
nbThe number of tiles.

© Copyright 2017, 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.