class PostGIS extends Database
A PostGIS Workspace connects to a PostGIS database.
PostGIS postgis = new PostGIS("database", "localhost", "5432", "public", "user", "password")
Modifiers | Name | Description |
---|---|---|
static class |
PostGIS.Factory |
The PostGIS WorkspaceFactory |
Constructor and description |
---|
PostGIS
(java.lang.String name, java.lang.String host, java.lang.String port, java.lang.String schema, java.lang.String user, java.lang.String password, boolean estimatedExtent, boolean createDatabase, java.lang.String createDatabaseParams) Create a new PostGIS Workspace with a name, host, port, schema, user, and password. |
PostGIS
(Map options, java.lang.String name) Create a new PostGIS with just a database name using defaults for other values. |
PostGIS
(JDBCDataStore ds) Create a new PostGIS Workspace from a GeoTools JDBCDataStore |
Type Params | Return Type | Name and description |
---|---|---|
|
static void |
deleteDatabase(java.lang.String name, java.lang.String host, java.lang.String port, java.lang.String user, java.lang.String password) Delete the database. |
|
static void |
deleteDatabase(Map options, java.lang.String name) Delete the database. |
|
java.lang.String |
getFormat() Get the format |
Methods inherited from class | Name |
---|---|
class Database |
createIndex, createIndex, createView, deleteIndex, deleteView, getDataSource, getIndexes, getSql, remove |
class Workspace |
add, add, close, create, create, get, getAt, getFormat, getLayers, getNames, getParameters, getWorkspace, getWorkspace, getWorkspaceNames, getWorkspaceParameters, has, readFeatures, remove, remove, withWorkspace, withWorkspace, withWorkspace, wrap |
Create a new PostGIS Workspace with a name, host, port, schema, user, and password.
PostGIS postgis = new PostGIS("database", "localhost", "5432", "public", "user", "password")
name
- The database namehost
- The host nameport
- The portschema
- The database schemauser
- The user namepassword
- The passwordestimatedExtent
- Whether to estimate the extent or notcreateDatabase
- Whether to create the database or notcreateDatabaseParams
- The database creation parameter stringCreate a new PostGIS with just a database name using defaults for other values.
PostGIS postgis = new PostGIS("database", user: 'me', password: 'supersecret')
options
- The options for connecting to a PostGIS database (host, port, schema, user, password,
estimatedExtent, createDatabase, and createDatabaseParams)name
- The database nameCreate a new PostGIS Workspace from a GeoTools JDBCDataStore
ds
- The GeoTools JDBCDataStoreDelete the database.
name
- The database namehost
- The hostport
- The portuser
- The user namepassword
- The passwordDelete the database.
options
- The named parameters
name
- The database nameGet the format