rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

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

List of all members.

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 an instance of IlvDefaultObjectSDOTileLoader.
virtual IlvMapsError dbmsRestored ()
 Called by the IlvSDOLayer read from an .ilv file, after the connection to an Oracle SDO database has been restored.
IlUInt getColArraySize () const
 Returns the DbLink fetch array size parameter passed to the setRequestParameters method. The default value is 10.
virtual
IlvObjectSDOFeatureIterator
getFeatureIterator (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.
const char * getLayerName ()
 Returns the name of the SDO layer of this tile loader.
virtual IldRequest * getRequest (IlvTile *tile)
 Returns the IldRequest containing the SDO geometries that intersect the specified tile.
char ** getRequestParameters () const
 Returns the five parameters (a copy of each) of the internal request used for load-on-demand.
virtual IlvRectgetSize ()
 Returns the bounding box of the data set managed by the tile loader.
IlUShort getTileGroupingCount () const
 Returns the number of tiles to be loaded in one unique request.
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.
virtual IlvMapsError load (IlvTile *tile)
 Virtual method implemented in the subclasses.
void setClippingRequest (IlBoolean set)
 Sets or unsets strict clipping policy.
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.
void setTileGroupingCount (IlUShort nb)
 Sets the number of tiles to be loaded in one unique request.

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 IlvDefaultObjectSDOTileLoader::setTileGroupingCount method.

See also:
IlvObjectSDOLayer

Constructor & Destructor Documentation

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 an 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:
mapAdapter The map adapter used by the loader.
dbms The IldDbms connection to an Oracle database.
tableName The name of the layer table to be loaded.
geometryColumnName The 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.
tileWidth The 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).
tileHeight The 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).
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.
keyColumnName The 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.
upperLeft The 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.
lowerRight The 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

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.

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:
IlvDefaultObjectSDOTileLoader::setRequestParameters
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:
request The IldRequest from which geometries are read.
geometryName The name of the column containing geometries.
keyExtractor The extractor that can extract featureIDs from the request rows.
xDimensionName The name of the X dimension.
yDimensionName The name of the Y dimension.
error The error that may have been produced by the method.
Returns:
The instance of IlvObjectSDOFeatureIterator used by the tile loader.
virtual IldRequest* IlvDefaultObjectSDOTileLoader::getRequest ( IlvTile tile  )  [virtual]

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

Returns 0 and must be implemented in the subclass.

See also:
IlvSDOTileLoader::load
Parameters:
tile The tile to be filled with the SDO geometries.

Reimplemented from IlvSDOTileLoader.

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:
IlvDefaultObjectSDOTileLoader::setRequestParameters
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.

Returns:
0

Reimplemented from IlvSDOTileLoader.

IlUShort IlvDefaultObjectSDOTileLoader::getTileGroupingCount (  )  const

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

See also:
IlvDefaultObjectSDOTileLoader::setTileGroupingCount
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
virtual IlvMapsError IlvDefaultObjectSDOTileLoader::load ( IlvTile tile  )  [virtual]

Virtual method implemented in the subclasses.

Returns:
IlvMaps::NoError().

Reimplemented from IlvSDOTileLoader.

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:
set If IlTrue, the strict clipping mode is set.
See also:
isClippingRequest
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, pass it as 0.

Parameters:
selectClause The select clause of the request. The default value is "*".
fromClause The from clause of the request. The default value is the name of the SDO layer.
whereClause The where clause of the request.
spatialOperator The 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.
spatialOperatorParams The parameters of the spatial operator. The default value is "querytype=window".
colArraySize The DbLink fetch array mode is activated. If you pass 0, the parameter is ignored. The value recommended by Oracle is 10. See IldRequest::setColArraySize.
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).


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