All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sdoOracle.sdoLayer

java.lang.Object
   |
   +----sdoOracle.sdoLayer

public class sdoLayer
extends Object
Class sdoLayer implements the SDO layer data.

See Also:
sdoInfo, sdoDraw, sdoQuery, sdoUpdate, sdoTune, sdoDimension, sdoGeometryList, sdoGIDList

Constructor Index

 o sdoLayer()
Constructs a new sdoLayer object.
 o sdoLayer(Connection, String)
Constructs a new sdoLayer object with the input parameters, and reads the information from tables '_sdolayer' and '_sdodim'.

Method Index

 o addGIDs(List, int, int)
Query for all gids in this layer and add them into a Java List.
 o Create(Connection, String, int, int, int, double, double, double, double, double, double)
Creates a hybrid-schema spatial layer in the database.
 o CreateFixed(Connection, String, int, int, double, double, double, double, double, double)
Creates a fixed-schema spatial layer in the database.
 o Define(Connection, String)
Defines the layer parameters.
 o DimensionLowerBound(int)
Returns the lower boundary for the input dimension.
 o DimensionTolerance(int)
Returns the tolerance for the input dimension.
 o DimensionUpperBound(int)
Returns the upper boundary for the input dimension.
 o Draw(double, double, double, double, sdoCanvas)
Draws the layer contents into a SDO canvas.
 o DrawGeom(sdoGeometryList, sdoCanvas)
Draws the list of geometries into a SDO canvas.
 o DrawRaw(double, double, double, double, sdoCanvas, int, String, boolean, int)
Draws the layer contents into a SDO canvas, with no concern about the geometry type.
 o Extent()
Returns the box that encloses all geometry of this layer.
 o FreeData()
Liberates the data from memory if it has been loaded.
 o GetAllObjects()
Returns all geometry collections with points and keep on memory.
 o GetAllObjects(boolean)
Returns all layer geometry with points or not.
 o GetGeometry()
Returns the list of geometries that are on memory.
 o GetGID(long)
Returns a list of geometries represented by sdoGID class.
 o GetGIDs()
Returns the list of a collection of geometries that are on memory.
 o GetHistogram(String, double, int)
returns a statistical histogram
 o GetInfo()
Reads the layer tables '_sdolayer' and '_sdodim', and update the layer attributes.
 o GetLevel()
Returns the level of partitioning for this layer.
 o GetNumTiles()
Returns the number of tiles for this layer.
 o GetObject(long)
Returns the list of geometries for the input id.
 o GetObjects(double, double, double, double, int, boolean)
Returns a list of geometries that overlap or are inside the input rectangle.
 o GetObjects(String, long, String)
Returns a list of geometries that match the input relation mask to the input gid (collection of geometries).
 o GetObjects(WPoint, double)
Returns a list of geometries that interacts with input point.
 o GetObjects(WPointList, int, boolean)
Returns a list of geometries that interacts with input geometry that must be a closed list of points.
 o GetOordinates()
Returns the number of oordinates per row.
 o GetRelation(long, long)
Returns the relation between two gid's (collection of geometries).
 o GetTableName()
Returns the layer name.
 o GetTiles(double, double, double, double, String)
Returns tiles that interacts with input mbr.
 o GetTiles(long, String)
Returns tiles for input gid (collection of geometries).
 o HasGeometry()
Verifies if geometry table '_sdogeom' table has geometric features.
 o HasIndex()
Verifies if index table '_sdoindex' table has information.
 o ImportAscii(URL)
Imports an ascii file Y axis coordinate first and X axis coordinate next.
 o Insert(sdoGeometry, int)
Inserts a new geometry into this layer.
 o Interact(long, long)
Identifies if two gid's (collection of geometries) have interaction.
 o Interact(long, String, long)
Identifies if two gid's (collection of geometries) of different layers have interaction.
 o Interact(long, WPointList, short)
Identifies if input gid (collection of geometries) have interaction with the input geometry represented by a list of points.
 o isHybridSchema()
Returns if the current layer has hybrid indexing schema.
 o LevelEstimate(int, String)
Estimates the partitioning level.
 o MaxCodeSize()
Returns the maximum code size for this layer.
 o MixInfo()
retrns data mixture information
 o NextElementId(long)
Returns the next element sequence value for input gid.
 o NumGIDs(boolean)
returns the number of GIDs
 o NumIndexedGIDs(boolean)
returns the number of indexed GIDs
 o NumTiles(String, boolean)
returns the number of SDO tiles
 o PopulateIndex(String, int, int, boolean, long)
Rebuilds the index file with hybrid schema.
 o PopulateIndexFixed(String, int, boolean, long)
Rebuilds the index file with fixed schema.
 o Remove(Connection)
Removes a spatial layer from the database.
 o Sample(Connection, String, String, int)
Samples a spatial layer into another layer in the database.
 o SelectedGIDs(String, long, String, int)
returns the number of selected GIDs in the query
 o SetGeometry(sdoGeometryList)
Associates the list of geometries in memory.
 o setShowInfo(boolean)
Whether or not to show selectivity information.
 o setTextArea(sdoTextArea, sdoErrorWindow)
Associates a text area to write information.
 o VerifyLayer()
Verifies if layer status is Ok.

Constructors

 o sdoLayer
 public sdoLayer()
Constructs a new sdoLayer object.

 o sdoLayer
 public sdoLayer(Connection conn,
                 String table)
Constructs a new sdoLayer object with the input parameters, and reads the information from tables '_sdolayer' and '_sdodim'.

Methods

 o GetGeometry
 public sdoGeometryList GetGeometry()
Returns the list of geometries that are on memory.

Returns:
returns a sdoGeometryList object or null.
 o SetGeometry
 public void SetGeometry(sdoGeometryList data)
Associates the list of geometries in memory.

Parameters:
data - sdoGeometryList object.
 o GetGIDs
 public sdoGIDList GetGIDs()
Returns the list of a collection of geometries that are on memory.

Returns:
returns a sdoGIDList object or null.
 o isHybridSchema
 public boolean isHybridSchema()
Returns if the current layer has hybrid indexing schema.

Returns:
returns true if hybrid schema exists, or false otherwise.
 o FreeData
 public void FreeData()
Liberates the data from memory if it has been loaded.

 o setTextArea
 public void setTextArea(sdoTextArea text,
                         sdoErrorWindow error)
Associates a text area to write information. This method is just for debug. Will be eliminated later.

Parameters:
text - sdoTextArea object.
error - sdoErrorWindow object.
 o Define
 public void Define(Connection conn,
                    String table)
Defines the layer parameters. This method reads '_sdolayer' and '_sdodim' tables if they exists.

 o GetInfo
 public boolean GetInfo()
Reads the layer tables '_sdolayer' and '_sdodim', and update the layer attributes.

Returns:
returns a boolean value true or false.
 o GetOordinates
 public int GetOordinates()
Returns the number of oordinates per row.

Returns:
returns an integer value.
 o GetLevel
 public int GetLevel()
Returns the level of partitioning for this layer.

Returns:
returns an integer value.
 o GetNumTiles
 public int GetNumTiles()
Returns the number of tiles for this layer.

Returns:
returns an integer value.
 o GetGID
 public sdoGID GetGID(long id)
Returns a list of geometries represented by sdoGID class.

Returns:
returns a sdoGID object or null.
 o Extent
 public Box Extent()
Returns the box that encloses all geometry of this layer. This box may be different from the information stored on the SDo dimension table.

Returns:
returns a Box object or null.
 o DimensionLowerBound
 public double DimensionLowerBound(int dimnumber)
Returns the lower boundary for the input dimension. Dimension value 1 means x axis, and value 2 means y axis.

Returns:
returns a double value.
 o DimensionUpperBound
 public double DimensionUpperBound(int dimnumber)
Returns the upper boundary for the input dimension. Dimension value 1 means x axis, and value 2 means y axis.

Returns:
returns a double value.
 o DimensionTolerance
 public double DimensionTolerance(int dimnumber)
Returns the tolerance for the input dimension. Dimension value 1 means x axis, and value 2 means y axis.

Returns:
returns a double value.
 o GetTableName
 public String GetTableName()
Returns the layer name.

Returns:
returns a String object with the layer name.
 o VerifyLayer
 public boolean VerifyLayer()
Verifies if layer status is Ok.

Returns:
returns a boolean value true or false.
 o MaxCodeSize
 public int MaxCodeSize()
Returns the maximum code size for this layer.

Returns:
returns an integer value.
 o NextElementId
 public int NextElementId(long id)
Returns the next element sequence value for input gid.

Returns:
returns an integer value.
 o HasGeometry
 public boolean HasGeometry()
Verifies if geometry table '_sdogeom' table has geometric features.

Returns:
returns a bollean value true or false.
 o HasIndex
 public boolean HasIndex()
Verifies if index table '_sdoindex' table has information.

Returns:
returns a bollean value true or false.
 o addGIDs
 public boolean addGIDs(List list,
                        int start,
                        int end)
Query for all gids in this layer and add them into a Java List.

Returns:
returns if there are more GIDs to fetch.
 o DrawGeom
 public boolean DrawGeom(sdoGeometryList geometries,
                         sdoCanvas canvas)
Draws the list of geometries into a SDO canvas.

Returns:
returns a boolean value true or false.
 o Draw
 public boolean Draw(double x1,
                     double y1,
                     double x2,
                     double y2,
                     sdoCanvas canvas)
Draws the layer contents into a SDO canvas. This method assumes that the query layer has been created with CreateQueryWindow method of sdoWorkspace class, if the input box does not contain the whole data.

Returns:
returns a boolean value true or false.
 o DrawRaw
 public boolean DrawRaw(double x1,
                        double y1,
                        double x2,
                        double y2,
                        sdoCanvas canvas,
                        int filter,
                        String mask,
                        boolean sampling,
                        int sample_ratio)
Draws the layer contents into a SDO canvas, with no concern about the geometry type. It just retrieve the x,y coordinate and draws. This method assumes that the query layer has been created with CreateQueryWindow method of sdoWorkspace class, if the input box does not contain the whole data. If the spatial relation mask is null, then this method assumes ANYINTERT as a spatial relation.

Returns:
returns a boolean value true or false.
 o setShowInfo
 public void setShowInfo(boolean showInfo)
Whether or not to show selectivity information.

Parameters:
showInfo - boolean variable.
 o GetAllObjects
 public sdoGIDList GetAllObjects()
Returns all geometry collections with points and keep on memory. The method FreeData must be called in order to liberate this memory.

Returns:
returns a sdoGIDList object or null.
 o GetAllObjects
 public sdoGeometryList GetAllObjects(boolean points)
Returns all layer geometry with points or not. If data is on memory, then the input parameter has no effect and the current list on memory is returned.

Returns:
returns a sdoGeometryList object or null.
 o GetObject
 public sdoGeometryList GetObject(long id)
Returns the list of geometries for the input id.

Returns:
returns a sdoGeometryList object.
 o GetObjects
 public sdoGeometryList GetObjects(String layer,
                                   long id,
                                   String relationmask)
Returns a list of geometries that match the input relation mask to the input gid (collection of geometries). The mask value can be a conbination of several relations, such as "INSIDE+OVERLAP". Refer to SDO manual about sdo_geom.relate function.

Returns:
returns a sdoGeometryList object,
 o GetObjects
 public sdoGeometryList GetObjects(double x1,
                                   double y1,
                                   double x2,
                                   double y2,
                                   int filter,
                                   boolean points)
Returns a list of geometries that overlap or are inside the input rectangle. The input parameter filter specify if primary or secondary filter has to be applied. If the input box contains the whole data, then the parameter filter is not used, therefore the primary or secondary filter are not used. If data is already on memory, input parameters "filter" and "points" have no effect. This method assumes that the query layer has been created with CreateQueryWindow method of sdoWorkspace class.

Returns:
returns a sdoGeometryList object or null.
 o GetObjects
 public sdoGeometryList GetObjects(WPointList coords,
                                   int filter,
                                   boolean points)
Returns a list of geometries that interacts with input geometry that must be a closed list of points. Primary or secondary filter can be used, as well the points may be loaded or not. Even if data is on memory this method goes to the database and returns a new list of geometries. This method assumes that the query layer has been created with CreateQueryWindow method of sdoWorkspace class.

Returns:
returns a sdoGeometryList object or null.
 o GetObjects
 public sdoGeometryList GetObjects(WPoint wc,
                                   double tol)
Returns a list of geometries that interacts with input point. This method has not been implemented yet.

Returns:
returns a sdoGeometryList object or null.
 o GetTiles
 public BoxList GetTiles(double xmin,
                         double ymin,
                         double xmax,
                         double ymax,
                         String tile_type)
Returns tiles that interacts with input mbr. Note: the hhcellbndry function doesn't work well with the input box, so for now the input parameters have no effect.

Returns:
returns a BoxList object or null.
 o GetTiles
 public BoxList GetTiles(long gid,
                         String tile_type)
Returns tiles for input gid (collection of geometries).

Returns:
returns a BoxList object or null.
 o GetRelation
 public String GetRelation(long gid1,
                           long gid2)
Returns the relation between two gid's (collection of geometries). Refer to SDO manual about sdo_geom.relate function.

Returns:
returns a String object with the spatial relation.
 o Interact
 public String Interact(long gid1,
                        long gid2)
Identifies if two gid's (collection of geometries) have interaction. Refer to SDO manual about sdo_geom.interact function.

Returns:
returns a String object with 'TRUE' or 'FALSE'.
 o Interact
 public String Interact(long gid1,
                        String layer2,
                        long gid2)
Identifies if two gid's (collection of geometries) of different layers have interaction. Refer to SDO manual about sdo_geom.interact function.

Returns:
returns a String object with 'TRUE' or 'FALSE'.
 o Interact
 public String Interact(long gid1,
                        WPointList coords,
                        short etype)
Identifies if input gid (collection of geometries) have interaction with the input geometry represented by a list of points. Refer to SDO manual about sdo_geom.interact function.

Returns:
returns a String object with 'TRUE' or 'FALSE'.
 o PopulateIndex
 public boolean PopulateIndex(String username,
                              int tilelevel,
                              int numtiles,
                              boolean isSingleTrans,
                              long trans_size)
Rebuilds the index file with hybrid schema.

Returns:
returns a boolean value true or false.
 o PopulateIndexFixed
 public boolean PopulateIndexFixed(String username,
                                   int tilelevel,
                                   boolean isSingleTrans,
                                   long trans_size)
Rebuilds the index file with fixed schema.

Returns:
returns a boolean value true or false.
 o Remove
 public boolean Remove(Connection conn)
Removes a spatial layer from the database.

Returns:
returns a boolean value true or false.
 o Sample
 public boolean Sample(Connection conn,
                       String old_table,
                       String new_table,
                       int ratio)
Samples a spatial layer into another layer in the database.

Returns:
returns a boolean value true or false.
 o Create
 public boolean Create(Connection conn,
                       String table,
                       int numoord,
                       int level,
                       int numtiles,
                       double lb1,
                       double ub1,
                       double tol1,
                       double lb2,
                       double ub2,
                       double tol2)
Creates a hybrid-schema spatial layer in the database.

Returns:
returns a boolean value true or false.
 o CreateFixed
 public boolean CreateFixed(Connection conn,
                            String table,
                            int numoord,
                            int level,
                            double lb1,
                            double ub1,
                            double tol1,
                            double lb2,
                            double ub2,
                            double tol2)
Creates a fixed-schema spatial layer in the database.

Returns:
returns a boolean value true or false.
 o Insert
 public boolean Insert(sdoGeometry sdogeom,
                       int updindex)
Inserts a new geometry into this layer. The geometry attributes such as id, type, and sequence must be already defined. The input parameter 'updindex' is not in use at this time, but the idea is to update the geometry index if this parameter is true.

Returns:
returns a boolean value true or false.
 o ImportAscii
 public boolean ImportAscii(URL map)
Imports an ascii file Y axis coordinate first and X axis coordinate next.

Returns:
returns a boolean value true or false.
 o LevelEstimate
 public int LevelEstimate(int maxtiles,
                          String extent)
Estimates the partitioning level.

Returns:
returns an integer value.
 o GetHistogram
 public double[] GetHistogram(String histo_name,
                              double maxvalue,
                              int intervals)
returns a statistical histogram

Returns:
returns an array of histogram values.
 o MixInfo
 public long[] MixInfo()
retrns data mixture information

Returns:
returns an array of long integers.
 o NumGIDs
 public long NumGIDs(boolean isDistinct)
returns the number of GIDs

Returns:
returns a long value.
 o NumIndexedGIDs
 public long NumIndexedGIDs(boolean isDistinct)
returns the number of indexed GIDs

Returns:
returns a long value.
 o NumTiles
 public long NumTiles(String column,
                      boolean isDistinct)
returns the number of SDO tiles

Returns:
returns a long value.
 o SelectedGIDs
 public long SelectedGIDs(String layer,
                          long id,
                          String relation_mask,
                          int filter)
returns the number of selected GIDs in the query

Returns:
returns a long integer value.

All Packages  Class Hierarchy  This Package  Previous  Next  Index