Class GeoTiffIIOMetadataAdapter

java.lang.Object
com.kheops.jmap.server.datasources.GeoTiffIIOMetadataAdapter

public class GeoTiffIIOMetadataAdapter extends Object
This class provides an abstraction from the details of TIFF data access for the purpose of retrieving GeoTIFF metadata from an image.

All of the GeoKey values are included here as constants, and the portions of the GeoTIFF specification pertaining to each have been copied for easy access.

The majority of the possible GeoKey values and their meanings are NOT reproduced here. Only the most important GeoKey code values have been copied, for others see the specification.

Convenience methods have been included to retrieve the various TIFFFields that are not part of the GeoKey directory, such as the Model Transformation and Model TiePoints. Retrieving a GeoKey from the GeoKey directory is a bit more specialized and requires knowledge of the correct key code.

Making use of the geographic metadata still requires some basic understanding of the GeoKey values that is not provided here.

For more information see the GeoTIFF specification at ...

  • Field Details

    • GTModelTypeGeoKey

      public static final int GTModelTypeGeoKey
      GTModelTypeGeoKey Key ID = 1024 Type: SHORT (code) Values: Section 6.3.1.1 Codes This GeoKey defines the general type of model Coordinate system used, and to which the raster space will be transformed: unknown, Geocentric (rarely used), Geographic, Projected Coordinate System, or user-defined. If the coordinate system is a PCS, then only the PCS code need be specified. If the coordinate system does not fit into one of the standard registered PCS'S, but it uses one of the standard projections and datums, then its should be documented as a PCS model with "user-defined" type, requiring the specification of projection parameters, etc.

      GeoKey requirements for User-Defined Model Type (not advisable): GTCitationGeoKey

      See Also:
    • GTRasterTypeGeoKey

      public static final int GTRasterTypeGeoKey
      GTRasterTypeGeoKey Key ID = 1025 Type = Section 6.3.1.2 codes

      This establishes the Raster Space coordinate system used; there are currently only two, namely RasterPixelIsPoint and RasterPixelIsArea. No user-defined raster spaces are currently supported. For variance in imaging display parameters, such as pixel aspect-ratios, use the standard TIFF 6.0 device-space tags instead.

      See Also:
    • GTCitationGeoKey

      public static final int GTCitationGeoKey
      GTCitationGeoKey Key ID = 1026 Type = ASCII

      As with all the "Citation" GeoKeys, this is provided to give an ASCII reference to published documentation on the overall configuration of this GeoTIFF file.

      See Also:
    • GeographicTypeGeoKey

      public static final int GeographicTypeGeoKey
      GeographicTypeGeoKey Key ID = 2048 Type = SHORT (code) Values = Section 6.3.2.1 Codes ...

      This key may be used to specify the code for the geographic coordinate system used to map lat-long to a specific ellipsoid over the earth.

      GeoKey Requirements for User-Defined geographic CS:

      GeogCitationGeoKey GeogGeodeticDatumGeoKey GeogAngularUnitsGeoKey (if not degrees) GeogPrimeMeridianGeoKey (if not Greenwich)

      See Also:
    • GeogCitationGeoKey

      public static final int GeogCitationGeoKey
      GeogCitationGeoKey Key ID = 2049 Type = ASCII Values = text

      General citation and reference for all Geographic CS parameters.

      See Also:
    • GeogGeodeticDatumGeoKey

      public static final int GeogGeodeticDatumGeoKey
      GeogGeodeticDatumGeoKey Key ID = 2050 Type = SHORT (code) Values = Section 6.3.2.2 Codes ...

      This key may be used to specify the horizontal datum, defining the size, position and orientation of the reference ellipsoid used in user-defined geographic coordinate systems.

      GeoKey Requirements for User-Defined Horizontal Datum: GeogCitationGeoKey GeogEllipsoidGeoKey

      See Also:
    • GeogPrimeMeridianGeoKey

      public static final int GeogPrimeMeridianGeoKey
      GeogPrimeMeridianGeoKey Key ID = 2051 Type = SHORT (code) Units: Section 6.3.2.4 code ...

      Allows specification of the location of the Prime meridian for user-defined geographic coordinate systems. The default standard is Greenwich, England.

      See Also:
    • GeogPrimeMeridianLongGeoKey

      public static final int GeogPrimeMeridianLongGeoKey
      GeogPrimeMeridianLongGeoKey Key ID = 2061 Type = DOUBLE Units = GeogAngularUnits

      This key allows definition of user-defined Prime Meridians, the location of which is defined by its longitude relative to Greenwich.

      See Also:
    • GeogLinearUnitsGeoKey

      public static final int GeogLinearUnitsGeoKey
      GeogLinearUnitsGeoKey Key ID = 2052 Type = SHORT Values: Section 6.3.1.3 Codes ...

      Allows the definition of geocentric CS linear units for user-defined GCS.

      See Also:
    • GeogLinearUnitSizeGeoKey

      public static final int GeogLinearUnitSizeGeoKey
      GeogLinearUnitSizeGeoKey Key ID = 2053 Type = DOUBLE Units: meters

      Allows the definition of user-defined linear geocentric units, as measured in meters.

      See Also:
    • GeogAngularUnitsGeoKey

      public static final int GeogAngularUnitsGeoKey
      GeogAngularUnitsGeoKey Key ID = 2054 Type = SHORT (code) Values = Section 6.3.1.4 Codes

      Allows the definition of geocentric CS Linear units for user-defined GCS and for ellipsoids.

      GeoKey Requirements for "user-defined" units: GeogCitationGeoKey GeogAngularUnitSizeGeoKey

      See Also:
    • GeogAngularUnitSizeGeoKey

      public static final int GeogAngularUnitSizeGeoKey
      GeogAngularUnitSizeGeoKey Key ID = 2055 Type = DOUBLE Units: radians

      Allows the definition of user-defined angular geographic units, as measured in radians.

      See Also:
    • GeogEllipsoidGeoKey

      public static final int GeogEllipsoidGeoKey
      GeogEllipsoidGeoKey Key ID = 2056 Type = SHORT (code) Values = Section 6.3.2.3 Codes ...

      This key may be used to specify the coded ellipsoid used in the geodetic datum of the Geographic Coordinate System.

      GeoKey Requirements for User-Defined Ellipsoid: GeogCitationGeoKey [GeogSemiMajorAxisGeoKey, [GeogSemiMinorAxisGeoKey | GeogInvFlatteningGeoKey] ]

      See Also:
    • GeogSemiMajorAxisGeoKey

      public static final int GeogSemiMajorAxisGeoKey
      GeogSemiMajorAxisGeoKey Key ID = 2057 Type = DOUBLE Units: Geocentric CS Linear Units

      Allows the specification of user-defined Ellipsoid Semi-Major Axis (a).

      See Also:
    • GeogSemiMinorAxisGeoKey

      public static final int GeogSemiMinorAxisGeoKey
      GeogSemiMinorAxisGeoKey Key ID = 2058 Type = DOUBLE Units: Geocentric CS Linear Units

      Allows the specification of user-defined Ellipsoid Semi-Minor Axis (b).

      See Also:
    • GeogInvFlatteningGeoKey

      public static final int GeogInvFlatteningGeoKey
      GeogInvFlatteningGeoKey Key ID = 2059 Type = DOUBLE Units: none.

      Allows the specification of the inverse of user-defined Ellipsoid's flattening parameter (f). The eccentricity-squared e^2 of the ellipsoid is related to the non-inverted f by: e^2 = 2*f - f^2

      Note: if the ellipsoid is spherical the inverse-flattening becomes infinite; use the GeogSemiMinorAxisGeoKey instead, and set it equal to the semi-major axis length.

      See Also:
    • GeogAzimuthUnitsGeoKey

      public static final int GeogAzimuthUnitsGeoKey
      GeogAzimuthUnitsGeoKey Key ID = 2060 Type = SHORT (code) Values = Section 6.3.1.4 Codes

      This key may be used to specify the angular units of measurement used to defining azimuths, in geographic coordinate systems. These may be used for defining azimuthal parameters for some projection algorithms, and may not necessarily be the same angular units used for lat-long.

      See Also:
    • ProjectedCSTypeGeoKey

      public static final int ProjectedCSTypeGeoKey
      ProjectedCSTypeGeoKey Key ID = 3072 Type = SHORT (codes) Values: Section 6.3.3.1 codes This code is provided to specify the projected coordinate system.

      GeoKey requirements for "user-defined" PCS families: PCSCitationGeoKey ProjectionGeoKey

      See Also:
    • PCSCitationGeoKey

      public static final int PCSCitationGeoKey
      PCSCitationGeoKey Key ID = 3073 Type = ASCII

      As with all the "Citation" GeoKeys, this is provided to give an ASCII reference to published documentation on the Projected Coordinate System particularly if this is a "user-defined" PCS.

      See Also:
    • ProjectionGeoKey

      public static final int ProjectionGeoKey
      ProjectionGeoKey Key ID = 3074 Type = SHORT (code) Values: Section 6.3.3.2 codes ...

      Allows specification of the coordinate transformation method and projection zone parameters. Note : when associated with an appropriate Geographic Coordinate System, this forms a Projected Coordinate System.

      GeoKeys Required for "user-defined" Projections: PCSCitationGeoKey ProjCoordTransGeoKey ProjLinearUnitsGeoKey (additional parameters depending on ProjCoordTransGeoKey).

      See Also:
    • ProjCoordTransGeoKey

      public static final int ProjCoordTransGeoKey
      ProjCoordTransGeoKey Key ID = 3075 Type = SHORT (code) Values: Section 6.3.3.3 codes ...

      Allows specification of the coordinate transformation method used. Note: this does not include the definition of the corresponding Geographic Coordinate System to which the projected CS is related; only the transformation method is defined here.

      GeoKeys Required for "user-defined" Coordinate Transformations: PCSCitationGeoKey (additional parameter geokeys depending on the Coord. Trans. specified).

      See Also:
    • ProjLinearUnitsGeoKey

      public static final int ProjLinearUnitsGeoKey
      ProjLinearUnitsGeoKey Key ID = 3076 Type = SHORT (code) Values: Section 6.3.1.3 codes

      Defines linear units used by this projection. ...

      See Also:
    • ProjLinearUnitSizeGeoKey

      public static final int ProjLinearUnitSizeGeoKey
      ProjLinearUnitSizeGeoKey Key ID = 3077 Type = DOUBLE Units: meters

      Defines size of user-defined linear units in meters.

      See Also:
    • ProjStdParallel1GeoKey

      public static final int ProjStdParallel1GeoKey
      ProjStdParallel1GeoKey Key ID = 3078 Type = DOUBLE Units: GeogAngularUnit Alias: ProjStdParallelGeoKey (from Rev 0.2)

      Latitude of primary Standard Parallel.

      See Also:
    • ProjStdParallel2GeoKey

      public static final int ProjStdParallel2GeoKey
      ProjStdParallel2GeoKey Key ID = 3079 Type = DOUBLE Units: GeogAngularUnit

      Latitude of second Standard Parallel.

      See Also:
    • ProjNatOriginLongGeoKey

      public static final int ProjNatOriginLongGeoKey
      ProjNatOriginLongGeoKey Key ID = 3080 Type = DOUBLE Units: GeogAngularUnit Alias: ProjOriginLongGeoKey

      Longitude of map-projection Natural origin.

      See Also:
    • ProjNatOriginLatGeoKey

      public static final int ProjNatOriginLatGeoKey
      ProjNatOriginLatGeoKey Key ID = 3081 Type = DOUBLE Units: GeogAngularUnit Alias: ProjOriginLatGeoKey

      Latitude of map-projection Natural origin.

      See Also:
    • ProjFalseEastingGeoKey

      public static final int ProjFalseEastingGeoKey
      ProjFalseEastingGeoKey Key ID = 3082 Type = DOUBLE Units: ProjLinearUnit Gives the easting coordinate of the map projection Natural origin.
      See Also:
    • ProjFalseNorthingGeoKey

      public static final int ProjFalseNorthingGeoKey
      ProjFalseNorthingGeoKey Key ID = 3083 Type = DOUBLE Units: ProjLinearUnit Gives the northing coordinate of the map projection Natural origin.
      See Also:
    • ProjFalseOriginLongGeoKey

      public static final int ProjFalseOriginLongGeoKey
      ProjFalseOriginLongGeoKey Key ID = 3084 Type = DOUBLE Units: GeogAngularUnit Gives the longitude of the False origin.
      See Also:
    • ProjFalseOriginLatGeoKey

      public static final int ProjFalseOriginLatGeoKey
      ProjFalseOriginLatGeoKey Key ID = 3085 Type = DOUBLE Units: GeogAngularUnit Gives the latitude of the False origin.
      See Also:
    • ProjFalseOriginEastingGeoKey

      public static final int ProjFalseOriginEastingGeoKey
      ProjFalseOriginEastingGeoKey Key ID = 3086 Type = DOUBLE Units: ProjLinearUnit Gives the easting coordinate of the false origin. This is NOT the False Easting, which is the easting attached to the Natural origin.
      See Also:
    • ProjFalseOriginNorthingGeoKey

      public static final int ProjFalseOriginNorthingGeoKey
      ProjFalseOriginNorthingGeoKey Key ID = 3087 Type = DOUBLE Units: ProjLinearUnit Gives the northing coordinate of the False origin. This is NOT the False Northing, which is the northing attached to the Natural origin.
      See Also:
    • ProjCenterLongGeoKey

      public static final int ProjCenterLongGeoKey
      ProjCenterLongGeoKey Key ID = 3088 Type = DOUBLE Units: GeogAngularUnit

      Longitude of Center of Projection. Note that this is not necessarily the origin of the projection.

      See Also:
    • ProjCenterLatGeoKey

      public static final int ProjCenterLatGeoKey
      ProjCenterLatGeoKey Key ID = 3089 Type = DOUBLE Units: GeogAngularUnit

      Latitude of Center of Projection. Note that this is not necessarily the origin of the projection.

      See Also:
    • ProjCenterEastingGeoKey

      public static final int ProjCenterEastingGeoKey
      ProjCenterEastingGeoKey Key ID = 3090 Type = DOUBLE Units: ProjLinearUnit Gives the easting coordinate of the center. This is NOT the False Easting.
      See Also:
    • ProjCenterNorthingGeoKey

      public static final int ProjCenterNorthingGeoKey
      ProjCenterNorthingGeoKey Key ID = 3091 Type = DOUBLE Units: ProjLinearUnit Gives the northing coordinate of the center. This is NOT the False Northing.

      NOTE this value is incorrectly named at ...

      See Also:
    • ProjScaleAtNatOriginGeoKey

      public static final int ProjScaleAtNatOriginGeoKey
      ProjScaleAtNatOriginGeoKey Key ID = 3092 Type = DOUBLE Units: none Alias: ProjScaleAtOriginGeoKey (Rev. 0.2)

      Scale at Natural Origin. This is a ratio, so no units are required.

      See Also:
    • ProjScaleAtCenterGeoKey

      public static final int ProjScaleAtCenterGeoKey
      ProjScaleAtCenterGeoKey Key ID = 3093 Type = DOUBLE Units: none

      Scale at Center. This is a ratio, so no units are required.

      See Also:
    • ProjAzimuthAngleGeoKey

      public static final int ProjAzimuthAngleGeoKey
      ProjAzimuthAngleGeoKey Key ID = 3094 Type = DOUBLE Units: GeogAzimuthUnit

      Azimuth angle east of true north of the central line passing through the projection center (for elliptical (Hotine) Oblique Mercator). Note that this is the standard method of measuring azimuth, but is opposite the usual mathematical convention of positive indicating counter-clockwise.

      See Also:
    • ProjStraightVertPoleLongGeoKey

      public static final int ProjStraightVertPoleLongGeoKey
      ProjStraightVertPoleLongGeoKey Key ID = 3095 Type = DOUBLE Units: GeogAngularUnit

      Longitude at Straight Vertical Pole. For polar stereographic.

      See Also:
    • VerticalCSTypeGeoKey

      public static final int VerticalCSTypeGeoKey
      VerticalCSTypeGeoKey Key ID = 4096 Type = SHORT (code) Values = Section 6.3.4.1 Codes ...

      This key may be used to specify the vertical coordinate system.

      See Also:
    • VerticalCitationGeoKey

      public static final int VerticalCitationGeoKey
      VerticalCitationGeoKey Key ID = 4097 Type = ASCII Values = text

      This key may be used to document the vertical coordinate system used, and its parameters.

      See Also:
    • VerticalDatumGeoKey

      public static final int VerticalDatumGeoKey
      VerticalDatumGeoKey Key ID = 4098 Type = SHORT (code) Values = Section 6.3.4.2 codes ...

      This key may be used to specify the vertical datum for the vertical coordinate system.

      See Also:
    • VerticalUnitsGeoKey

      public static final int VerticalUnitsGeoKey
      VerticalUnitsGeoKey Key ID = 4099 Type = SHORT (code) Values = Section 6.3.1.3 Codes ...

      This key may be used to specify the vertical units of measurement used in the geographic coordinate system, in cases where geographic CS's need to reference the vertical coordinate. This, together with the Citation key, comprise the only fully implemented keys in this section, at present.

      See Also:
    • ModelTypeProjected

      public static final int ModelTypeProjected
      6.3.1.1 Model Type Codes Ranges: 0 = undefined [ 1, 32766] = GeoTIFF Reserved Codes 32767 = user-defined [32768, 65535] = Private User Implementations GeoTIFF defined CS Model Type Codes: ModelTypeProjected = 1 Projection Coordinate System ModelTypeGeographic = 2 Geographic latitude-longitude System ModelTypeGeocentric = 3 Geocentric (X,Y,Z) Coordinate System

      Notes: 1. ModelTypeGeographic and ModelTypeProjected correspond to the FGDC metadata Geographic and Planar-Projected coordinate system types.

      See Also:
    • ModelTypeGeographic

      public static final int ModelTypeGeographic
      See Also:
    • ModelTypeGeocentric

      public static final int ModelTypeGeocentric
      See Also:
    • RasterPixelIsArea

      public static final int RasterPixelIsArea
      6.3.1.2 Raster Type Codes Ranges: 0 = undefined [ 1, 1023] = Raster Type Codes (GeoTIFF Defined) [1024, 32766] = Reserved 32767 = user-defined [32768, 65535]= Private User Implementations

      Note: Use of "user-defined" or "undefined" raster codes is not recommended.

      See Also:
    • RasterPixelIsPoint

      public static final int RasterPixelIsPoint
      See Also:
    • Linear_Meter

      public static final int Linear_Meter
      6.3.1.3 Linear Units Codes There are several different kinds of units that may be used in geographically related raster data: linear units, angular units, units of time (e.g. for radar-return), CCD-voltages, etc. For this reason there will be a single, unique range for each kind of unit, broken down into the following currently defined ranges:

      Ranges: 0 = undefined [ 1, 2000] = Obsolete GeoTIFF codes [2001, 8999] = Reserved by GeoTIFF [9000, 9099] = EPSG Linear Units. [9100, 9199] = EPSG Angular Units. 32767 = user-defined unit [32768, 65535]= Private User Implementations

      See Also:
    • Linear_Foot

      public static final int Linear_Foot
      See Also:
    • Linear_Foot_US_Survey

      public static final int Linear_Foot_US_Survey
      See Also:
    • Linear_Foot_Modified_American

      public static final int Linear_Foot_Modified_American
      See Also:
    • Linear_Foot_Clarke

      public static final int Linear_Foot_Clarke
      See Also:
    • Linear_Foot_Indian

      public static final int Linear_Foot_Indian
      See Also:
    • Linear_Chain_Benoit

      public static final int Linear_Chain_Benoit
      See Also:
    • Linear_Chain_Sears

      public static final int Linear_Chain_Sears
      See Also:
    • Linear_Yard_Sears

      public static final int Linear_Yard_Sears
      See Also:
    • Linear_Yard_Indian

      public static final int Linear_Yard_Indian
      See Also:
    • Linear_Fathom

      public static final int Linear_Fathom
      See Also:
    • Linear_Mile_International_Nautical

      public static final int Linear_Mile_International_Nautical
      See Also:
    • Angular_Radian

      public static final int Angular_Radian
      6.3.1.4 Angular Units Codes These codes shall be used for any key that requires specification of an angular unit of measurement.
      See Also:
    • Angular_Degree

      public static final int Angular_Degree
      See Also:
    • Angular_Arc_Minute

      public static final int Angular_Arc_Minute
      See Also:
    • Angular_Arc_Second

      public static final int Angular_Arc_Second
      See Also:
    • Angular_Grad

      public static final int Angular_Grad
      See Also:
    • Angular_Gon

      public static final int Angular_Gon
      See Also:
    • Angular_DMS

      public static final int Angular_DMS
      See Also:
    • Angular_DMS_Hemisphere

      public static final int Angular_DMS_Hemisphere
      See Also:
    • GCS_NAD27

      public static final int GCS_NAD27
      6.3.2.1 Geographic CS Type Codes Note: A Geographic coordinate system consists of both a datum and a Prime Meridian. Some of the names are very similar, and differ only in the Prime Meridian, so be sure to use the correct one. The codes beginning with GCSE_xxx are unspecified GCS which use ellipsoid (xxx); it is recommended that only the codes beginning with GCS_ be used if possible.

      Ranges:

      0 = undefined [ 1, 1000] = Obsolete EPSG/POSC Geographic Codes [ 1001, 3999] = Reserved by GeoTIFF [ 4000, 4199] = EPSG GCS Based on Ellipsoid only [ 4200, 4999] = EPSG GCS Based on EPSG Datum [ 5000, 32766] = Reserved by GeoTIFF 32767 = user-defined GCS [32768, 65535] = Private User Implementations Values: Note: Geodetic datum using Greenwich PM have codes equal to the corresponding Datum code - 2000. Ellipsoid-Only GCS: Note: the numeric code is equal to the code of the correspoding EPSG ellipsoid, minus 3000.

      Note: Only a handful of values have been reproduced here, for the remainder see the GeoTIFF specification.

      See Also:
    • GCS_NAD83

      public static final int GCS_NAD83
      See Also:
    • GCS_WGS_72

      public static final int GCS_WGS_72
      See Also:
    • GCS_WGS_72BE

      public static final int GCS_WGS_72BE
      See Also:
    • GCS_WGS_84

      public static final int GCS_WGS_84
      See Also:
    • GCSE_WGS84

      public static final int GCSE_WGS84
      See Also:
    • PCS_WGS72_UTM_zone_1N

      public static final int PCS_WGS72_UTM_zone_1N
      6.3.3.1 Projected CS Type Codes Ranges: [ 1, 1000] = Obsolete EPSG/POSC Projection System Codes [20000, 32760] = EPSG Projection System codes 32767 = user-defined [32768, 65535] = Private User Implementations Special Ranges: 1. For PCS utilizing GeogCS with code in range 4201 through 4321: As far as is possible the PCS code will be of the format gggzz where ggg is (geodetic datum code -4000) and zz is zone. 2. For PCS utilizing GeogCS with code out of range 4201 through 4321 (i.e. geodetic datum code 6201 through 6319). PCS code 20xxx where xxx is a sequential number. 3. Other: WGS72 / UTM northern hemisphere: 322zz where zz is UTM zone number WGS72 / UTM southern hemisphere: 323zz where zz is UTM zone number WGS72BE / UTM northern hemisphere: 324zz where zz is UTM zone number WGS72BE / UTM southern hemisphere: 325zz where zz is UTM zone number WGS84 / UTM northern hemisphere: 326zz where zz is UTM zone number WGS84 / UTM southern hemisphere: 327zz where zz is UTM zone number US State Plane (NAD27): 267xx/320xx US State Plane (NAD83): 269xx/321xx Note: These are only a subset of the possible values
      See Also:
    • PCS_WGS72_UTM_zone_60N

      public static final int PCS_WGS72_UTM_zone_60N
      See Also:
    • PCS_WGS72_UTM_zone_1S

      public static final int PCS_WGS72_UTM_zone_1S
      See Also:
    • PCS_WGS72_UTM_zone_60S

      public static final int PCS_WGS72_UTM_zone_60S
      See Also:
    • PCS_WGS72BE_UTM_zone_1N

      public static final int PCS_WGS72BE_UTM_zone_1N
      See Also:
    • PCS_WGS72BE_UTM_zone_60N

      public static final int PCS_WGS72BE_UTM_zone_60N
      See Also:
    • PCS_WGS72BE_UTM_zone_1S

      public static final int PCS_WGS72BE_UTM_zone_1S
      See Also:
    • PCS_WGS72BE_UTM_zone_60S

      public static final int PCS_WGS72BE_UTM_zone_60S
      See Also:
    • PCS_WGS84_UTM_zone_1N

      public static final int PCS_WGS84_UTM_zone_1N
      See Also:
    • PCS_WGS84_UTM_zone_60N

      public static final int PCS_WGS84_UTM_zone_60N
      See Also:
    • PCS_WGS84_UTM_zone_1S

      public static final int PCS_WGS84_UTM_zone_1S
      See Also:
    • PCS_WGS84_UTM_zone_60S

      public static final int PCS_WGS84_UTM_zone_60S
      See Also:
    • GEO_KEY_DIRECTORY_VERSION_INDEX

      public static final int GEO_KEY_DIRECTORY_VERSION_INDEX
      An index into the geoKey directory for the directory version number
      See Also:
    • GEO_KEY_REVISION_INDEX

      public static final int GEO_KEY_REVISION_INDEX
      An index into the geoKey directory for the geoKey revision number
      See Also:
    • GEO_KEY_MINOR_REVISION_INDEX

      public static final int GEO_KEY_MINOR_REVISION_INDEX
      An index into the geoKey directory for the geoKey minor revision number
      See Also:
    • GEO_KEY_NUM_KEYS_INDEX

      public static final int GEO_KEY_NUM_KEYS_INDEX
      An index into the geoKey directory for the number of geoKeys
      See Also:
    • TIFF_IFD_TAG

      public static final String TIFF_IFD_TAG
      The DOM element ID (tag) for a TIFF Image File Directory
      See Also:
    • TIFF_FIELD_TAG

      public static final String TIFF_FIELD_TAG
      The DOM element ID (tag) for a TIFF Field
      See Also:
    • TIFF_DOUBLES_TAG

      public static final String TIFF_DOUBLES_TAG
      The DOM element ID (tag) for a set of TIFF Double values
      See Also:
    • TIFF_DOUBLE_TAG

      public static final String TIFF_DOUBLE_TAG
      The DOM element ID (tag) for a single TIFF double. The value is stored in an attribute named "value"
      See Also:
    • TIFF_SHORTS_TAG

      public static final String TIFF_SHORTS_TAG
      The DOM element ID (tag) for a set of TIFF Short values
      See Also:
    • TIFF_SHORT_TAG

      public static final String TIFF_SHORT_TAG
      The DOM element ID (tag) for a single TIFF Short value. The value is stored in an attribute named "value"
      See Also:
    • TIFF_RATIONALS_TAG

      public static final String TIFF_RATIONALS_TAG
      The DOM element ID (tag) for a set of TIFF Rational values
      See Also:
    • TIFF_RATIONAL_TAG

      public static final String TIFF_RATIONAL_TAG
      The DOM element ID (tag) for a single TIFF Rational value. The value is stored in an attribute named "value"
      See Also:
    • TIFF_ASCIIS_TAG

      public static final String TIFF_ASCIIS_TAG
      The DOM element ID (tag) for a set of TIFF Ascii values
      See Also:
    • TIFF_ASCII_TAG

      public static final String TIFF_ASCII_TAG
      The DOM element ID (tag) for a single TIFF Ascii value
      See Also:
    • NUMBER_ATTR

      public static final String NUMBER_ATTR
      The DOM attribute name for a TIFF Field Tag (number)
      See Also:
    • VALUE_ATTR

      public static final String VALUE_ATTR
      The DOM attribute name for a TIFF Entry value (whether Short, Double, or Ascii)
      See Also:
  • Constructor Details

    • GeoTiffIIOMetadataAdapter

      public GeoTiffIIOMetadataAdapter(IIOMetadata imageMetadata)
      The constructor builds a metadata adapter for the image metadata root IIOMetadataNode.
      Parameters:
      imageMetadata - The image metadata
  • Method Details

    • getGeoKeyDirectoryVersion

      public int getGeoKeyDirectoryVersion()
      Gets the version of the GeoKey directory. This is typically a value of 1 and can be used to check that the data is of a valid format.
    • getGeoKeyRevision

      public int getGeoKeyRevision()
      Gets the revision number of the GeoKeys in this metadata.
    • getGeoKeyMinorRevision

      public int getGeoKeyMinorRevision()
      Gets the minor revision number of the GeoKeys in this metadata.
    • getNumGeoKeys

      public int getNumGeoKeys()
      Gets the number of GeoKeys in the geokeys directory.
    • getGeoKey

      public String getGeoKey(int keyID)
      Gets a GeoKey value as a String. This implementation should be invalid input: '&quotquiet'invalid input: '&quot' in the sense that it should not throw any exceptions but only return null in the event that the data organization is not as expected.
      Parameters:
      keyID - The numeric ID of the GeoKey
      Returns:
      A string representing the value, or null if the key was not found.
    • getGeoKeyRecord

      public GeoTiffIIOMetadataAdapter.GeoKeyRecord getGeoKeyRecord(int keyID)
      Gets a record containing the four TIFFShort values for a geokey entry. For more information see the GeoTIFF specification.
      Returns:
      the record with the given keyID, or null if none is found
    • getModelPixelScales

      public double[] getModelPixelScales()
      Gets the model pixel scales from the correct TIFFField
    • getModelTiePoints

      public double[] getModelTiePoints()
      Gets the model tie points from the appropriate TIFFField
      Returns:
      the tie points, or null if not found
    • getModelTransformation

      public double[] getModelTransformation()
      Gets the model tie points from the appropriate TIFFField
      Returns:
      the tie points, or null if not found
    • getValueAttribute

      protected String getValueAttribute(Node node)
      Gets the value attribute of the given Node.
      Parameters:
      node - A Node containing a value attribute, for example the node invalid input: '&ltTIFFShort' value=invalid input: '&quot123'invalid input: '&quot'invalid input: '&gt'
      Returns:
      A String containing the text from the value attribute. In the above example, the string would be 123
    • getIntValueAttribute

      protected int getIntValueAttribute(Node node)
      Gets the value attribute's contents and parses it as an int
    • getRationalValueAttribute

      protected double getRationalValueAttribute(Node node)
      Récupère la valeur d'un attribut et la décode sous la forme d'un rationel x/y
      Parameters:
      node - noeud traité
      Returns:
      valeur
    • getTiffField

      protected IIOMetadataNode getTiffField(int tag)
      Gets a TIFFField node with the given tag number. This is done by searching for a TIFFField with attribute number whose value is the specified tag value.
    • getTiffShorts

      protected int[] getTiffShorts(IIOMetadataNode tiffField)
      Gets an array of int values stored in a TIFFShorts element that contains a sequence of TIFFShort values.
      Parameters:
      tiffField - An IIOMetadataNode pointing to a TIFFField element that contains a TIFFShorts element.
    • getTiffShort

      protected int getTiffShort(IIOMetadataNode tiffField, int index)
      Gets a single TIFFShort value at the given index.
      Parameters:
      tiffField - An IIOMetadataNode pointing to a TIFFField element that contains a TIFFShorts element.
      index - The 0-based index of the desired short value
    • getTiffDoubles

      protected double[] getTiffDoubles(IIOMetadataNode tiffField)
      Gets an array of double values from a TIFFDoubles TIFFField.
      Parameters:
      tiffField - An IIOMetadataNode pointing to a TIFFField element that contains a TIFFDoubles element.
    • getTiffDouble

      protected double getTiffDouble(IIOMetadataNode tiffField, int index)
      Gets a single double value at the specified index from a sequence of TIFFDoubles
      Parameters:
      tiffField - An IIOMetadataNode pointing to a TIFFField element that contains a TIFFDoubles element.
    • getTiffRationals

      protected double[] getTiffRationals(IIOMetadataNode tiffField)
      Gets an array of int values stored in a TIFFRationals element that contains a sequence of TIFFRational values.
      Parameters:
      tiffField - An IIOMetadataNode pointing to a TIFFField element that contains a TIFFRationals element.
    • getTiffRational

      protected double getTiffRational(IIOMetadataNode tiffField, int index)
      Gets a single TIFFRational value at the given index.
      Parameters:
      tiffField - An IIOMetadataNode pointing to a TIFFField element that contains a TIFFRational element.
      index - The 0-based index of the desired short value
    • getTiffAscii

      protected String getTiffAscii(IIOMetadataNode tiffField, int start, int length)
      Gets a portion of a TIFFAscii string with the specified start character and length;
      Parameters:
      tiffField - An IIOMetadataNode pointing to a TIFFField element that contains a TIFFAsciis element. This element should contain a single TiffAscii element.
      Returns:
      A substring of the value contained in the TIFFAscii node, with the final '|' character removed.