Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

this is a work in progress (incomplete)

The DataStoreFinder is a generic method to use pluggable DataStores. See How to use a PostGISDataStore for an example of using this with the PostGISDataStore. The following is a list of parameters for the different DataStores available in geotools.

ShapefileDataStore

  • url - the url to the .shp file.

PostGISDataStore

  • dbtype - must be "postgis".
  • host - the ip address or name of the machine running PostGIS. So if PostGIS is running on the same machine as geotools then "localhost" and "127.0.0.1" will both work. Be sure that Postgresql is started with the -i option, or geotools will not be able to connect.
  • port - the database server port as an Integer object (usually new Integer(5432)).
  • database - the database name you are connecting to. This must be a PostGIS database, with 'createlang plpgsql' and 'psql -f postgis.sql' both run (see http://postgis.refractions.net/README.postgis.txt for more information).
  • user - the database user to connect as.
  • passwd - password for the user.

Note that for geometries to work the table must have a valid entry in the 'geometry_columns' table. All geometry columns created with the 'AddGeometryColumn' function in PostGIS should be fine. GeoTools will work fine with tables that do not have geometries. GeoTools also prefers that all tables are created with primary keys. The featureids created will not work as well if there is no primary keys. (TODO tutorial on featureids and working with/programming an fidmapper).

MySQLDataStore

  • dbtype - must be "mysql"
  • host - the ip address or name of the machine running PostGIS. So if MySQL is running on the same machine as geotools then "localhost" and "127.0.0.1" will both work.
  • port - the database server port as an String object (usually "3306"). todo - should be changed to Integer type
  • database - the database name you are connecting to.
  • user - the database user to connect as.
  • passwd - password for the user.

DB2DataStore

  • dbtype - must be "db2"
  • host - the ip address or name of the machine running DB2. So if DB2 is running on the same machine as geotools then "localhost" and "127.0.0.1" will both work.
  • port - the database server port as an String object.
     - "0" for a JDBC type 2 connection to a locally-cataloged database
     - usually "50000" for a JDBC type 4 connection to DB2 for Linux, Unix and Windows
     - usually "446" for a JDBC type 4 connection to DB2 for z/OS).
  • database - the database name you are connecting to.
  • tabschema - the schema name of the spatial tables.  Note that this is case-sensitive.
  • user - the database user to connect as.
  • passwd - password for the user.

 OcacleDataStore

ArcSDEDataStore

Mandatory parameters:

  • dbtype - must be "arcsde"
  • server - The machine in which the ArcSDE instance is running.
  • port - The port the ArcSDE instance is running on. The default is 5151
  • user - The user to connect with.
  • password - The password to connect with.

Optional parameters:

  • instance - The ArcSDE instance name (generally "sde", or whatever you called the database).
  • pool.minConnections - minimun number of connections in the pool (currently has to be at least 2 due to a bug. Note that for ArcSDE 8.x installations, 1 connection == 1 licence. ArcSDE 9.0 does not works this way, you can have as many connections as you like (at least that's what they say)
  • pool.maxConnections - upper limit to the connection poool.
  • pool.timeout - timeout in millisecodns a thread waits for a connection before failing due to an UnavailableConnectionException

GeoMediaDataStore

  • dbtype -

TigerDataStore

  • dbtype -