|
deegree 2.2 (2008/12/22 11:33 build-3038-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.io.sdeapi.SpatialQuery
public class SpatialQuery
This class handles a complete ArcSDE request: If instanciated, the class can open a connection/instance of the specified ArcSDE server, set a bounding box as a spatial filter to query the defined layer. The resultset of the query contains the geometries as well as the tabular data associated with them. The table is stored as a deegree Table object whereas the geometries are stored as an array of deegree GM_Objects. Depending on the datatype of the geometries, the array of GM_Objects might be GM_Point, GM_Curve etc.
Some bits of sample code to create a query:
SpatialQuery sq = new SpatialQuery();
try {
sq.openConnection(server, instance, database, user, password);
sq.setLayer(layer);
sq.setSpatialFilter(minX, minY, maxX, maxY);
sp.runSpatialQuery();
GM_Object[] deegree_gm_obj = sq.getGeometries();
Table deegree_table = sq.getTable();
sq.closeConnection();
} catch ( SeException sexp ) {
}
Constructor Summary | |
---|---|
SpatialQuery(String server,
int port,
String database,
String user,
String password)
Creates a new SpatialQuery object. |
Method Summary | |
---|---|
void |
closeConnection()
Close the current connection to the ArcSDE server throws SeException |
Geometry[] |
getGeometries()
Get GM_Object[] containing the queried Geometries returns null if no query has been done yet. |
com.esri.sde.sdk.client.SeLayer |
getLayer()
Get the current SDE layer returns null if it not yet set. |
com.esri.sde.sdk.client.SeShape |
getSpatialFilter()
Get the current Spatial Filter returns null if it not yet set. |
void |
openConnection(String server,
int port,
String database,
String user,
String password)
Connect to the ArcSDE server throws SeException |
Table |
runSpatialQuery(String[] cols)
Runs a spatial query against the opened layer using the specified spatial filter. |
void |
setLayer(String layername)
Set a SDE layer to work on and appropriate table throws SeException |
void |
setSpatialFilter(double minx,
double miny,
double maxx,
double maxy)
Set a SpatialFilter to Query (BoundingBox) throws SeException |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpatialQuery(String server, int port, String database, String user, String password) throws com.esri.sde.sdk.client.SeException
server
- port
- database
- user
- password
-
com.esri.sde.sdk.client.SeException
Method Detail |
---|
public void openConnection(String server, int port, String database, String user, String password) throws com.esri.sde.sdk.client.SeException
com.esri.sde.sdk.client.SeException
public void closeConnection() throws com.esri.sde.sdk.client.SeException
com.esri.sde.sdk.client.SeException
public void setLayer(String layername) throws com.esri.sde.sdk.client.SeException
com.esri.sde.sdk.client.SeException
public com.esri.sde.sdk.client.SeLayer getLayer()
public void setSpatialFilter(double minx, double miny, double maxx, double maxy) throws com.esri.sde.sdk.client.SeException
com.esri.sde.sdk.client.SeException
public com.esri.sde.sdk.client.SeShape getSpatialFilter()
public Geometry[] getGeometries()
public Table runSpatialQuery(String[] cols) throws com.esri.sde.sdk.client.SeException, DeegreeSeException
com.esri.sde.sdk.client.SeException
DeegreeSeException
|
deegree 2.2 (2008/12/22 11:33 build-3038-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net