Package org.geotools.coverage.io.impl
Class CoverageIO
- Object
-
- CoverageIO
-
public class CoverageIO extends Object
A class containing static convenience methods for locatingCoverageAccess
s and specificCoverageSource
s, and performing simple encoding and decoding.- Author:
- Simone Giannecchini, GeoSolutions, Jody Garnett
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
canConnect(Map<String,Serializable> params)
Test to see if this factory is suitable for processing the data pointed to by the params map.static CoverageAccess
connect(Map<String,Serializable> params)
static CoverageAccess
connect(Map<String,Serializable> params, Hints hints, ProgressListener listener)
static Driver
findDriver(URL url)
Returns aDriver
that is able to read a certain object.static Set<Driver>
findDrivers(URL url)
static Set<Driver>
getAvailableDrivers()
Finds all available implementations ofDriver
which have registered using the services mechanism, and that have the appropriate libraries on the class-path.static Driver[]
getAvailableDriversArray()
Returns an array with all availableDriver
implementations.static void
scanForPlugins()
Scans for factory plug-ins on the application class path.
-
-
-
Method Detail
-
canConnect
public static boolean canConnect(Map<String,Serializable> params)
Test to see if this factory is suitable for processing the data pointed to by the params map.If this datasource requires a number of parameters then this method should check that they are all present and that they are all valid. If the datasource is a file reading data source then the extensions or mime types of any files specified should be checked. For example, a Shapefile datasource should check that the url param ends with shp, such tests should be case insensitive.
- Parameters:
params
- The full set of information needed to construct a live data source.- Returns:
- boolean true if and only if this factory can process the resource indicated by the param set and all the required params are present.
-
connect
public static CoverageAccess connect(Map<String,Serializable> params, Hints hints, ProgressListener listener) throws IOException
- Throws:
IOException
-
connect
public static CoverageAccess connect(Map<String,Serializable> params) throws IOException
- Throws:
IOException
-
getAvailableDrivers
public static Set<Driver> getAvailableDrivers()
Finds all available implementations ofDriver
which have registered using the services mechanism, and that have the appropriate libraries on the class-path.- Returns:
- An unmodifiable
Set
of all discovered drivers which have registered factories, and whose available method returns true.
-
scanForPlugins
public static void scanForPlugins()
Scans for factory plug-ins on the application class path. This method is needed because the application class path can theoretically change, or additional plug-ins may become available. Rather than re-scanning the class-path on every invocation of the API, the class path is scanned automatically only on the first invocation. Clients can call this method to prompt a re-scan. Thus this method need only be invoked by sophisticated applications which dynamically make new plug-ins available at runtime.
-
getAvailableDriversArray
public static Driver[] getAvailableDriversArray()
Returns an array with all availableDriver
implementations.It can be used together basic information about all the available
GridCoverage
plugins. Note that this method finds all the implemented plugins but returns only the available one.A plugin could be implemented but not available due to missing dependencies.
- Returns:
- an array with all available
Driver
implementations.
-
-