/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2005-2008, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotools.gce.imagecollection; import java.awt.RenderingHints; import java.util.Collections; import java.util.Map; import org.geotools.coverage.grid.io.GridFormatFactorySpi; import org.opengis.coverage.grid.Format; /** * Implementation of the {@link Format} service provider interface for image collections. * @author Simone Giannecchini, GeoSolutions SAS * @author Daniele Romagnoli, GeoSolutions SAS * @author Simone Giannecchini, GeoSolutions SAS * @author Daniele Romagnoli, GeoSolutions SAS * * * @source $URL: http://svn.osgeo.org/geotools/trunk/modules/unsupported/imagecollection/src/main/java/org/geotools/gce/imagecollection/ImageCollectionFormatFactory.java $ */ public final class ImageCollectionFormatFactory implements GridFormatFactorySpi { public ImageCollectionFormat createFormat() { return new ImageCollectionFormat(); } public boolean isAvailable() { boolean available = true; // if these classes are here, then the runtine environment has // access to JAI and the JAI ImageI/O toolbox. try { Class.forName("javax.media.jai.JAI"); Class.forName("com.sun.media.jai.operator.ImageReadDescriptor"); } catch (ClassNotFoundException cnf) { available = false; } return available; } /** * Returns the implementation hints. The default implementation returns en * empty map. * */ public Map<RenderingHints.Key, ?> getImplementationHints() { return Collections.emptyMap(); } }