Rogue Wave Views Maps Package API Reference Guide |
Rogue Wave Views Documentation Home |
This class can write the content of an IlvMapFeatureIterator
to an Oracle SDO layer.
More...
#include <ilviews/maps/format/oracle/sdowrite.h>
Public Member Functions | |
IlvSDOWriter (IldDbms *dbms, const char *layerName, IlInt firstGidValue) | |
Initializes an IlvSDOWriter to write data to an existing SDO layer. More... | |
IlvSDOWriter (IldDbms *dbms, const char *layerName, IlInt sdoGeomCoordinatesCount, const IlvCoordinate &upperLeftBound, const IlvCoordinate &lowerRightBound) | |
Initializes an IlvSDOWriter that creates an SDO layer. More... | |
IldDbms * | getDbms () const |
Returns the current IldDbms of the writer. More... | |
virtual IlvMapsError | getInitStatus () const |
Returns the init status of the writer. More... | |
const char * | getLayerName () const |
Returns the current layer name of the writer. More... | |
virtual IlvMapsError | populateIndexes (IlUShort tilingLevel) |
Creates (if necessary) and populates the spatial index table using a specified tiling level. More... | |
virtual IlvMapsError | writeFeature (const IlvMapFeature *feature) |
Puts the map feature passed as argument in the [layerName]_SDOGEOM table. More... | |
virtual IlvMapsError | writeFeatureIterator (IlvMapFeatureIterator *reader, IlInt &count) |
Writes the iterator map features, passed as its argument, into the Oracle SDO database. More... | |
This class can write the content of an IlvMapFeatureIterator
to an Oracle SDO layer.
Library: ilvdbmaps
The supported map feature geometries are
IlvMapPoint
IlvMapLineString
IlvMapPolygon
IlvMapMultiPoint
IlvMapMultiCurve
for multi line string IlvMapMultiArea
for multi polygon The following example shows how to use this class to create a SDO layer in an Oracle database, fill it with map features coming from an IlvFeatureIterator
, and create a spatial indexation.
IlvMapsError error; IlvSDOWriter* writer = new IlvSDOWriter(dbms, "MyLayer", 16, IlvCoordinate(-360, 90), IlvCoordinate(360, -90)); error = writer->getInitStatus(); // you should handle error case here // creating a source feature iterator IlvShapeFileReader* reader = new IlvShapeFileReader(...); // dumping its content to the Oracle layer IlInt geomCount; error = writer->writeFeatureIterator(reader, geomCount); // you should handle error case here // Creating an SDO spatial indexation error = writer->populateIndexes(IlvSDOUtil::EstimateTilingLevel(dbms, "MyLayer", IlvSDOUtil::ALL_GID_EXTENT, 10000, error)); // you should handle error case here
IlvSDOWriter::IlvSDOWriter | ( | IldDbms * | dbms, |
const char * | layerName, | ||
IlInt | firstGidValue | ||
) |
Initializes an IlvSDOWriter
to write data to an existing SDO layer.
dbms | The IldDbms connection to the Oracle database. |
layerName | The name of the SDO layer to which the geometries will be appended. It can contain the owner name of the table: "OwnerName.LayerName". Otherwise, the user name of the IldDbms parameter is considered as the owner name. |
firstGidValue | The first value for the GID of the first geometry that will be saved in the database. The writer will then increment this value for the following GID values. |
IlvSDOWriter::IlvSDOWriter | ( | IldDbms * | dbms, |
const char * | layerName, | ||
IlInt | sdoGeomCoordinatesCount, | ||
const IlvCoordinate & | upperLeftBound, | ||
const IlvCoordinate & | lowerRightBound | ||
) |
Initializes an IlvSDOWriter
that creates an SDO layer.
The IlvSDOWriter
object can then fill the layer with one or more IlvMapFeatureIterator
objects.
dbms | The IldDbms connection to the Oracle database. |
layerName | The SDO layer name for the writer. |
sdoGeomCoordinatesCount | The number of coordinate columns in the [layerName]_SDOGEOM table. For example, setting this parameter to 8 will create the [layerName]_SDOGEOM table with the following columns: SDO_GID , SDO_ESEQ , SDO_ETYPE , SDO_SEQ , SDO_X1 , SDO_Y1 , ..., SDO_X8 , SDO_Y8 . |
upperLeftBound | The upper-left corner of the bounding box of the SDO layer. |
lowerRightBound | The lower-right corner of the bounding box of the SDO layer. |
IldDbms* IlvSDOWriter::getDbms | ( | ) | const |
Returns the current IldDbms
of the writer.
IldDbms
of the writer.
|
virtual |
Returns the init status of the writer.
It will return an error if there has been one (SQL Error, ...) in the constructor.
const char* IlvSDOWriter::getLayerName | ( | ) | const |
Returns the current layer name of the writer.
|
virtual |
Creates (if necessary) and populates the spatial index table using a specified tiling level.
Creating a spatial index is mandatory for the use of an IlvSDOLayer
.
tilingLevel | The SDO layer tiling level value. |
IlvMaps::NoError()
otherwise.
|
virtual |
Puts the map feature passed as argument in the [layerName]_SDOGEOM table.
feature | The map feature to be written in the Database. |
IlvMaps::NoError()
otherwise.
|
virtual |
Writes the iterator map features, passed as its argument, into the Oracle SDO database.
reader | The IlvMapFeatureIterator instance. |
count | The number of saved features. |
IlvMaps::NoError()
otherwise. © 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.