|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.maps.format.oracle.IlvSDOWriter
public class IlvSDOWriter
This class can write the content of an IlvFeatureIterator to an
Oracle SDO layer.
The supported map feature geometries are all those supported by Oracle SDO
Relational Model.
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 index.
IlvSDOWriter writer =
new IlvSDOWriter(connection, "MyLayer", 16, new IlvCoordinate(-360d, 90d), new IlvCoordinate(360d, -90d)); // creating a source feature iterator IlvShapeFileReader reader = new IlvShapeFileReader(...); // dumping its content to the Oracle layer writer.writeFeatureIterator(reader); // Creating an SDO spatial index writer.populateIndexes(IlvSDOUtil.EstimateTilingLevel(connection, "MyLayer", IlvSDOUtil.LAYER_EXTENT, 360*180));
| Constructor Summary | |
|---|---|
IlvSDOWriter(Connection connection,
String layerName,
int sdoGeomCoordinatesCount,
IlvCoordinate upperLeftBound,
IlvCoordinate lowerRightBound)
Initializes an IlvSDOWriter that creates an SDO layer. |
|
IlvSDOWriter(Connection connection,
String layerName,
int firstGidValue,
String ownerName)
Initializes an IlvSDOWriter to write data to an existing
SDO layer. |
|
| Method Summary | |
|---|---|
Connection |
getConnection()
Returns the current connection of the writer. |
String |
getLayerName()
Returns the current layer name of the writer. |
String |
getOwnerName()
Returns the owner name of the SDO table. |
void |
populateIndexes(int tilingLevel)
Creates and populates the spatial index table using a specified tiling level. |
void |
writeFeature(IlvMapFeature feature)
Puts the map feature passed as argument in the [layerName]_SDOGEOM table. |
int |
writeFeatureIterator(IlvMapFeatureIterator reader)
Writes the iterator passed as its argument into the Oracle SDO database. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlvSDOWriter(Connection connection,
String layerName,
int firstGidValue,
String ownerName)
throws SQLException
IlvSDOWriter to write data to an existing
SDO layer.
connection - The connection to the Oracle databaselayerName - The name of the SDO layer to which the geometries
will be appendedfirstGidValue - 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.ownerName - The name of the owner of the SDO table
SQLException
public IlvSDOWriter(Connection connection,
String layerName,
int sdoGeomCoordinatesCount,
IlvCoordinate upperLeftBound,
IlvCoordinate lowerRightBound)
throws SQLException
IlvSDOWriter that creates an SDO layer. The IlvSDOWriter
object can then populate the layer with one or more IlvMapFeatureIteratorobjects.
connection - The connection to the Oracle databaselayerName - The SDO layer name for the writersdoGeomCoordinatesCount - 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 layerlowerRightBound - The lower-right corner of the bounding box of the SDO layer
SQLException| Method Detail |
|---|
public String getOwnerName()
public String getLayerName()
public Connection getConnection()
public void writeFeature(IlvMapFeature feature)
throws Exception
Exception
public int writeFeatureIterator(IlvMapFeatureIterator reader)
throws Exception
reader - The IlvMapFeatureIterator instance
Exception
public void populateIndexes(int tilingLevel)
throws SQLException
IlvSDOLayer.
tilingLevel - The sdo layer's tiling level value.
SQLException
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||