org.geotools.gce.geotiff.adapters
Class CRS2GeoTiffMetadataAdapter

Object
  extended by CRS2GeoTiffMetadataAdapter

public final class CRS2GeoTiffMetadataAdapter
extends Object

This class implements a simple reusable adapter to adapt a CoordinateReferenceSystem into useful Geotiff metadata by mean of GeoTiffIIOMetadataEncoder.

Since CoordinateReferenceSystem are essentially immutable this class implements a static pool of CRS2GeoTiffMetadataAdapter objects that would allow to avoid parsing the same CoordinateReferenceSystem more than once.

Since:
2.2
Author:
Simone Giannecchini
Module:
trunk/gt/plugin   (gt-plugin.jar) (Maven report) (SVN head)

Field Summary
static int DEFAULT_MAX
          The default value for #maxStrongReferences .
 
Constructor Summary
CRS2GeoTiffMetadataAdapter(CoordinateReferenceSystem crs)
          Constructs a parser using the default set of symbols and factories.
 
Method Summary
static void clear()
          Releases resources immediately instead of waiting for the garbage collector.
static Object get(Object key)
          Returns an object from the pool for the specified code.
 GeoTiffIIOMetadataEncoder parseCoordinateReferenceSystem()
          Parses a coordinate reference system.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX

public static final int DEFAULT_MAX
The default value for #maxStrongReferences .

See Also:
Constant Field Values
Constructor Detail

CRS2GeoTiffMetadataAdapter

public CRS2GeoTiffMetadataAdapter(CoordinateReferenceSystem crs)
Constructs a parser using the default set of symbols and factories.

Method Detail

get

public static Object get(Object key)
Returns an object from the pool for the specified code. If the object was retained as a weak reference, the referent is returned.


clear

public static void clear()
Releases resources immediately instead of waiting for the garbage collector.


parseCoordinateReferenceSystem

public GeoTiffIIOMetadataEncoder parseCoordinateReferenceSystem()
                                                         throws GeoTiffException
Parses a coordinate reference system.

For the moment we can only encode geographic and projected coordinate reference systems, we cannot encode the other types like vertical coordinate reference systems.

Throws:
GeoTiffException


Copyright © 1996-2009 Geotools. All Rights Reserved.