org.geotools.data.coverage.grid
Interface GridFormatFactorySpi

All Superinterfaces:
Factory
All Known Implementing Classes:
ArcGridFormatFactory, GeoTiffFormatFactorySpi, GTopo30FormatFactory, WMSFormatFactory, WorldImageFormatFactory

public interface GridFormatFactorySpi
extends Factory

Constructs a live GridCoverageFormat.

In addition to implementing this interface datastores should have a services file:

META-INF/services/org.geotools.data.GridCoverageFormatFactorySpi

The file should contain a single line which gives the full name of the implementing class.

example:
e.g. org.geotools.data.arcgrid.ArcGridFormatFactory

The factories are never called directly by users, instead the GridFormatFinder class is used.

Author:
Jody Garnett, Refractions Research

Method Summary
 org.opengis.coverage.grid.Format createFormat()
          Construct a live grid format using the params specifed.
 boolean isAvailable()
          Test to see if this format is available, if it has all the appropriate libraries to construct a format.
 
Methods inherited from interface org.geotools.factory.Factory
getImplementationHints
 

Method Detail

createFormat

public org.opengis.coverage.grid.Format createFormat()
Construct a live grid format using the params specifed.

Returns:
The created DataSource, this may be null if the required resource was not found or if insufficent parameters were given. Note that canProcess() should have returned false if the problem is to do with insuficent parameters.
Throws:
java.io.IOException - if there were any problems creating or connecting the datasource.

isAvailable

public boolean isAvailable()
Test to see if this format is available, if it has all the appropriate libraries to construct a format.

Most datastores should return true, because geotools will distribute the appropriate libraries. Though it's not a bad idea for DataStoreFactories to check to make sure that the libraries are there.

Returns:
true if and only if this factory has all the appropriate jars on the classpath to handle a Format.


Copyright © GeoTools. All Rights Reserved.