org.geotools.data.coverage.grid
Class AbstractGridFormat

java.lang.Object
  extended byorg.geotools.data.coverage.grid.AbstractGridFormat
All Implemented Interfaces:
org.opengis.coverage.grid.Format
Direct Known Subclasses:
ArcGridFormat, GeoTiffFormat, GTopo30Format, UnknownFormat, WorldImageFormat

public abstract class AbstractGridFormat
extends java.lang.Object
implements org.opengis.coverage.grid.Format

AbstractGridFormat is a convenience class so subclasses only need to populate a Map class and set the read and write parameter fields. For example the ArcGridFormat has the following method which sets up all the required information: private void setInfo(){ HashMap info=new HashMap(); info.put("name", "ArcGrid"); info.put("description", "Arc Grid Coverage Format"); info.put("vendor", "Geotools"); info.put("docURL", "http://gdal.velocet.ca/projects/aigrid/index.html"); info.put("version", "1.0"); mInfo=info; readParameters=new GeneralParameterDescriptor[2]; readParameters[0]=ArcGridOperationParameter.getGRASSReadParam(); readParameters[0]=ArcGridOperationParameter.getCompressReadParam(); writeParameters=new GeneralParameterDescriptor[2]; writeParameters[0]=ArcGridOperationParameter.getGRASSWriteParam(); writeParameters[0]=ArcGridOperationParameter.getCompressWriteParam(); }

Author:
jeichar, Simone Giannecchini (simboss)
See Also:
AbstractFormatFactory

Field Summary
protected static java.util.Map CRSAuthorityfactoriesMap
          Synchronized map of created CRS Authorities.
protected  java.util.Map mInfo
          The Map object is used by the information methods(such as getName()) as a data source.
protected  org.opengis.parameter.ParameterValueGroup readParameters
           
protected  org.opengis.parameter.ParameterValueGroup writeParameters
           
 
Constructor Summary
AbstractGridFormat()
           
 
Method Summary
abstract  boolean accepts(java.lang.Object input)
           
protected static void addAuthorityFactory(java.lang.String code, org.opengis.referencing.crs.CRSAuthorityFactory authorityFactory)
          Add an authority factory to the authority map.
 boolean equals(org.opengis.coverage.grid.Format f)
           
protected static org.opengis.referencing.crs.CRSAuthorityFactory getAuthorityfactory(java.lang.String code)
          getAuthorityfactory This method retrieves an authority factory with the specified code.
static org.opengis.referencing.crs.CoordinateReferenceSystem getDefaultCRS()
          getDefaultCRS This method provides the user with a default crs WGS84
 java.lang.String getDescription()
           
 java.lang.String getDocURL()
           
 java.lang.String getName()
           
abstract  org.opengis.coverage.grid.GridCoverageReader getReader(java.lang.Object source)
           
 org.opengis.parameter.ParameterValueGroup getReadParameters()
           
 java.lang.String getVendor()
           
 java.lang.String getVersion()
           
 org.opengis.parameter.ParameterValueGroup getWriteParameters()
           
abstract  org.opengis.coverage.grid.GridCoverageWriter getWriter(java.lang.Object destination)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mInfo

protected java.util.Map mInfo
The Map object is used by the information methods(such as getName()) as a data source. The keys in the Map object (for the associated method) are as follows: getName() key = "name" value type=String getDescription() key = "description" value type=String getVendor() key = "vendor" value type=String getDocURL() key = "docURL" value type=String getVersion() key = "version" value type=String Naturally, any methods that are overridden need not have an entry in the Map


readParameters

protected org.opengis.parameter.ParameterValueGroup readParameters

writeParameters

protected org.opengis.parameter.ParameterValueGroup writeParameters

CRSAuthorityfactoriesMap

protected static java.util.Map CRSAuthorityfactoriesMap
Synchronized map of created CRS Authorities. Since creating a CRS Authority Factory is an heavy duty we store them there and we share them between all gridformats for all threads.

Constructor Detail

AbstractGridFormat

public AbstractGridFormat()
Method Detail

addAuthorityFactory

protected static void addAuthorityFactory(java.lang.String code,
                                          org.opengis.referencing.crs.CRSAuthorityFactory authorityFactory)
Add an authority factory to the authority map.

Parameters:
code - String
authorityFactory - CRSAuthorityFactory

getAuthorityfactory

protected static org.opengis.referencing.crs.CRSAuthorityFactory getAuthorityfactory(java.lang.String code)
getAuthorityfactory This method retrieves an authority factory with the specified code.

Parameters:
code - String
Returns:
CRSAuthorityFactory

getName

public java.lang.String getName()
Specified by:
getName in interface org.opengis.coverage.grid.Format
See Also:
Format.getName()

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface org.opengis.coverage.grid.Format
See Also:
Format.getDescription()

getVendor

public java.lang.String getVendor()
Specified by:
getVendor in interface org.opengis.coverage.grid.Format
See Also:
Format.getVendor()

getDocURL

public java.lang.String getDocURL()
Specified by:
getDocURL in interface org.opengis.coverage.grid.Format
See Also:
Format.getDocURL()

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface org.opengis.coverage.grid.Format
See Also:
Format.getVersion()

getReader

public abstract org.opengis.coverage.grid.GridCoverageReader getReader(java.lang.Object source)
To Do:
javadoc

getWriter

public abstract org.opengis.coverage.grid.GridCoverageWriter getWriter(java.lang.Object destination)
To Do:
javadoc

accepts

public abstract boolean accepts(java.lang.Object input)

equals

public boolean equals(org.opengis.coverage.grid.Format f)
See Also:
Format.equals(org.geotools.data.coverage.grid.Format)

getReadParameters

public org.opengis.parameter.ParameterValueGroup getReadParameters()
Specified by:
getReadParameters in interface org.opengis.coverage.grid.Format

getWriteParameters

public org.opengis.parameter.ParameterValueGroup getWriteParameters()
Specified by:
getWriteParameters in interface org.opengis.coverage.grid.Format

getDefaultCRS

public static org.opengis.referencing.crs.CoordinateReferenceSystem getDefaultCRS()
getDefaultCRS This method provides the user with a default crs WGS84



Copyright © GeoTools. All Rights Reserved.