Skip navigation links

Package org.geotoolkit.coverage.sql

A schema for storing coverages metadata in a SQL database.

See: Description

Package org.geotoolkit.coverage.sql Description

A schema for storing coverages metadata in a SQL database. The coverage sample values are stored as ordinary files encoded in arbitrary image formats (PNG, RAW, ASCII, JPEG-2000, etc. - note that the classic JPEG format is not recommended). A PostgreSQL database is used for storing coverage metadata like geographic envelopes and meaning of pixel values. The database is also used as an index for searching image files from a 2D, 3D or 4D spatio-temporal envelopes. The current implementation requires the PostgreSQL database with the PostGIS extension. The easiest way to install the database is to run the graphical wizard. The connection to the database is specified by a JDBC DataSource and a Properties map, which are given to the CoverageDatabase constructor. The properties map can contain the following optional entries:
URL  The JDBC URL to the database (only if no DataSource is given).
user  The user name.
password  The password.
schema  The database schema to use. The default is to use the PostgreSQL "search_path" variable.
timezone  The timezone for the dates in the database. Default is UTC.
rootDirectory  The root directory of image files. Paths declared in the database are relative to that directory.
A CoverageDatabase can be used in different ways. Some methods can be invoked directly on the CoverageDatabase instance:
CoverageDatabase db = new CoverageDatabase(...);
CoverageQuery query = new CoverageQuery(db);
CoverageEnvelope env = query.getEnvelope();
env.setHorizontalRange(...); // Convenience method for setting the horizontal dimension.
env.setTimeRange(...);       // Convenience method for setting the temporal dimension.
query.setEnvelope(env);      // As a matter of principle, but actually not necessary.
query.setLayer("My Layer");
FutureQuery<GridCoverage2D> fc = db.readSlice(query);

// Do some other work here while the coverage is loaded in background.

GridCoverage2D coverage = fc.result();
It is also possible to get a LayerCoverageReader instance, which give access to the same functionalities through the GridCoverageReader API.
3.09 (derived from Seagis)
Martin Desruisseaux (IRD, Geomatys)

Defined in the geotk-coverage-sql module

Skip navigation links

Copyright © 2009–2017 All rights reserved.