|
deegree 2.3 (2010/04/09 10:10 build-4-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.io.datastore.Datastore
org.deegree.io.datastore.sql.AbstractSQLDatastore
org.deegree.io.datastore.sql.postgis.PostGISDatastore
public class PostGISDatastore
Datastore implementation for PostGIS/PostgreSQL databases.
| Field Summary |
|---|
| Fields inherited from class org.deegree.io.datastore.sql.AbstractSQLDatastore |
|---|
pool |
| Constructor Summary | |
|---|---|
PostGISDatastore()
|
|
| Method Summary | |
|---|---|
protected Connection |
acquireConnection()
Returns the database connection requested for. |
SQLFunctionCall |
buildSRSTransformCall(MappedGeometryPropertyType geoProperty,
String targetSRS)
Returns an SQLFunctionCall that refers to the given MappingGeometryField in the specified target
SRS using a database specific SQL function. |
String |
buildSRSTransformCall(String geomIdentifier,
int nativeSRSCode)
Builds an SQL fragment that converts the given geometry to the specified SRS. |
protected boolean |
canTransformTo(String targetSRS)
Returns whether the datastore is capable of performing a native coordinate transformation (using an SQL function call for example) into the given SRS. |
Geometry |
convertDBToDeegreeGeometry(Object value,
CoordinateSystem targetCS,
Connection conn)
Converts a PostGIS specific geometry Object from the ResultSet to a deegree
Geometry. |
org.postgis.PGgeometry |
convertDeegreeToDBGeometry(Geometry geometry,
int targetSRS,
Connection conn)
Converts a deegree Geometry to a PostGIS specific geometry object. |
int |
getNativeSRSCode(String srsName)
Returns the database specific code for the given SRS name. |
Object |
getSequenceNextVal(Connection conn,
String sequence)
Returns the next value of the given SQL sequence. |
PostGISWhereBuilder |
getWhereBuilder(MappedFeatureType[] rootFts,
String[] aliases,
Filter filter,
SortProperty[] sortProperties,
TableAliasGenerator aliasGenerator,
VirtualContentProvider vcProvider)
Returns a specific WhereBuilder implementation for PostGIS. |
protected Query |
transformQuery(Query query)
Transforms the incoming Query so that the CoordinateSystem of all spatial arguments (BBOX, etc.) |
protected FeatureCollection |
transformResult(FeatureCollection fc,
String targetSRS)
Transforms the FeatureCollection so that the geometries of all contained geometry properties use the
requested SRS. |
| Methods inherited from class org.deegree.io.datastore.sql.AbstractSQLDatastore |
|---|
acquireTransaction, appendGeometryColumnGet, close, configure, convertFromDBType, createTransaction, determineFidsToLock, getAnnotationParser, getMaxValue, getSequenceCurrValPlusOffset, performQuery, performQuery, performQuery, prepareStatement, releaseConnection, releaseTransaction |
| Methods inherited from class org.deegree.io.datastore.Datastore |
|---|
bindSchema, getConfiguration, getFeatureType, getSchemas |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PostGISDatastore()
| Method Detail |
|---|
public PostGISWhereBuilder getWhereBuilder(MappedFeatureType[] rootFts,
String[] aliases,
Filter filter,
SortProperty[] sortProperties,
TableAliasGenerator aliasGenerator,
VirtualContentProvider vcProvider)
throws DatastoreException
WhereBuilder implementation for PostGIS.
getWhereBuilder in class AbstractSQLDatastorerootFts - involved (requested) feature typesaliases - aliases for the feature types, may be nullfilter - filter that restricts the matched featuressortProperties - sort criteria for the result, may be null or emptyaliasGenerator - used to generate unique table aliasesvcProvider -
WhereBuilder implementation for PostGIS
DatastoreException
public Geometry convertDBToDeegreeGeometry(Object value,
CoordinateSystem targetCS,
Connection conn)
throws SQLException
Object from the ResultSet to a deegree
Geometry.
convertDBToDeegreeGeometry in class AbstractSQLDatastorevalue - targetCS - conn -
SQLException
public org.postgis.PGgeometry convertDeegreeToDBGeometry(Geometry geometry,
int targetSRS,
Connection conn)
throws DatastoreException
Geometry to a PostGIS specific geometry object.
convertDeegreeToDBGeometry in class AbstractSQLDatastoregeometry - targetSRS - conn -
DatastoreException
protected Connection acquireConnection()
throws DatastoreException
AbstractSQLDatastore
acquireConnection in class AbstractSQLDatastoreDatastoreException
public Object getSequenceNextVal(Connection conn,
String sequence)
throws DatastoreException
getSequenceNextVal in class AbstractSQLDatastoreconn - JDBC connection to be usedsequence - name of the SQL sequence
DatastoreException - if the value could not be retrievedprotected Query transformQuery(Query query)
Query so that the CoordinateSystem of all spatial arguments (BBOX, etc.)
in the Filter match the SRS of the targeted MappingGeometryFields.
NOTE: If this transformation can be performed by the backend (e.g. by Oracle Spatial), this method should be
overwritten to return the original input Query.
transformQuery in class Datastorequery - query to be transformed
protected FeatureCollection transformResult(FeatureCollection fc,
String targetSRS)
FeatureCollection so that the geometries of all contained geometry properties use the
requested SRS.
transformResult in class Datastorefc - feature collection to be transformedtargetSRS - requested SRS
protected boolean canTransformTo(String targetSRS)
canTransformTo in class DatastoretargetSRS - target spatial reference system (usually "EPSG:XYZ")
public SQLFunctionCall buildSRSTransformCall(MappedGeometryPropertyType geoProperty,
String targetSRS)
throws DatastoreException
SQLFunctionCall that refers to the given MappingGeometryField in the specified target
SRS using a database specific SQL function.
buildSRSTransformCall in class AbstractSQLDatastoregeoProperty - geometry propertytargetSRS - target spatial reference system (usually "EPSG:XYZ")
SQLFunctionCall that refers to the geometry in the specified srs
DatastoreException
public String buildSRSTransformCall(String geomIdentifier,
int nativeSRSCode)
throws DatastoreException
AbstractSQLDatastore
buildSRSTransformCall in class AbstractSQLDatastoreDatastoreExceptionpublic int getNativeSRSCode(String srsName)
AbstractSQLDatastore
getNativeSRSCode in class AbstractSQLDatastoresrsName - spatial reference system name (usually "EPSG:XYZ")
|
deegree 2.3 (2010/04/09 10:10 build-4-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://www.deegree.org