org.geotools.gce.geotiff.adapters
Class GeoKeyEntry

Object
  extended by GeoKeyEntry
All Implemented Interfaces:
Comparable<GeoKeyEntry>

public final class GeoKeyEntry
extends Object
implements Comparable<GeoKeyEntry>

This class is a holder for a GeoKey record containing four short values as specified in the GeoTiff spec. The values are a GeoKey ID, the TIFFTag number of the location of this data, the count of values for this GeoKey, and the offset (or value if the location is 0).

If the Tiff Tag location is 0, then the value is a Short and is contained in the offset. Otherwise, there is one or more value in the specified external Tiff tag. The number is specified by the count field, and the offset into the record is the offset field.

Author:
Simone Giannecchini, GeoSolutions, Mike Nidel
Module:
modules/plugin/geotiff (gt-geotiff.jar)

Constructor Summary
GeoKeyEntry(int keyID, int tagLoc, int count, int offset)
          Constructor of a GeoKeyEntry.
 
Method Summary
 int compareTo(GeoKeyEntry o)
          According to GeoTIff spec: In the TIFF spec it is required that TIFF tags be written out to the file in tag-ID sorted order.
 boolean equals(Object obj)
           
 int getCount()
           
 int getKeyID()
           
 int getTiffTagLocation()
           
 int getValueOffset()
           
 int[] getValues()
           
 int hashCode()
           
 void setCount(int count)
           
 void setKeyID(int keyID)
           
 void setTiffTagLocation(int tagLoc)
           
 void setValueOffset(int valueOffset)
           
 String toString()
           
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeoKeyEntry

public GeoKeyEntry(int keyID,
                   int tagLoc,
                   int count,
                   int offset)
Constructor of a GeoKeyEntry.

Parameters:
keyID - the id of this GeoKeyEntry.
tagLoc - the location of this tag.
count -
offset -
Method Detail

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getKeyID

public int getKeyID()

getTiffTagLocation

public int getTiffTagLocation()

getCount

public int getCount()

getValueOffset

public int getValueOffset()

setCount

public void setCount(int count)

setKeyID

public void setKeyID(int keyID)

setTiffTagLocation

public void setTiffTagLocation(int tagLoc)

setValueOffset

public void setValueOffset(int valueOffset)

getValues

public int[] getValues()

compareTo

public int compareTo(GeoKeyEntry o)
According to GeoTIff spec:

In the TIFF spec it is required that TIFF tags be written out to the file in tag-ID sorted order. This is done to avoid forcing software to perform N-squared sort operations when reading and writing tags.

Specified by:
compareTo in interface Comparable<GeoKeyEntry>


Copyright © 1996-2009 Geotools. All Rights Reserved.