Contact: | |
|---|---|
Tracker: | http://jira.codehaus.org/browse/GEOT-4424 |
Tagline: | GridCoverageReader API |
Children: |
Description
The current implementation status of the GridCoveargeReader normally associates a single reader with a single coverage (e.g., TIFF, GTOPO30, and so on). The intention of this proposal is to break the 1-1 association and allow GridCoverageReader to expose multiple covearges in an efficient way, in order to properly deal with sources storing multiple coverages with different structures and features (e.g., not mosaics, which can deal with multiple coverages having some degree of uniformity).
The current GridCoverageReader interface already allows to expose multiple coverages, but in an inefficient and thread unsafe way, as it is intended to read GridCoverages from the input stream in a sequential order In order to access different coverages, once the reader is open, one needs to check if more coverages are available by checking hasMoreGridCoverages and then skip to the desired coverage, and get the name of current coverage through the getCurrentSubname method. Thus, there are two issues:
- Need to open a new reader for each different coverage read, which is rather inefficient as normally the opening of a reader requires parsing the raster data header, or gathering network or database connections, something that is better done only once instead
- Need to linearly scan the contents of the reader to reach the desired coverage, with no form of random access, hampering the usage of the current API in storages that contain a large amount of coverages
Additional notes on base implementation changes:
Base class implementing GridCoverageReader is AbstractGridCoverage2DReader. The implementation of AbstractGridCoverage2DReader will be changed so that implementors of the current API won't be affected by the change, but allowing new multi-coverage readers to get full benefit from the new API
An outlook into the future
This work is meant as a stepping stone to allow a smooth transition between old style coverage APIs (based on current GridCoverageReader which doesn't have proper logic to deal with time/elevation domains) and new coverage-api currently living on unsupported/coverage-experiment, and loosely based on the DataAccess paradigm, as well as the WCS protocol, which allows for
- proper geospatial dimensions management (time domain, vertical domain, custom domains) without having to deal with lists of strings
- a single coverageAccess to deal with multiple underlying coverage sources
Status
This proposal is under construction.
Voting has not started yet:
- Andrea Aime
- Ben Caradoc-Davies
- Christian Mueller
- Ian Turton
- Justin Deoliveira
- Jody Garnett
- Simone Giannecchini
Tasks
This section is used to make sure your proposal is complete (did you remember documentation?) and has enough paid or volunteer time lined up to be a success
| no progress |
| done |
| impeded |
| lack mandate/funds/time |
| volunteer needed |
|---|
- API changed based on BEFORE / AFTER
- Update default implementation
- Update wiki (both module matrix and upgrade to to 2.5 pages) |
- Remove deprecated code from GeoTools project
- Update the user guide
- Update or provided sample code in demo
- review user documentation
API Changes
GridCoverageReader
BEFORE:
AFTER:
GridCoverage2DReader (new interface extending GridCoverageReader)
Default implementation changes
AbstractGridCoverage2DReader
BEFORE:
AFTER:
Code Examples
BEFORE:
AFTER:
Documentation Changes
list the pages effected by this proposal
- Module Matrix page