Class GeoTiffIIOMetadataEncoder
Object
GeoTiffIIOMetadataEncoder
This class is responsible for encoding the geotiff tags into suitable metadata for the ImageIO library.
Basically it is and encoder/adapter that collects all the different tags, order it accordingly to the spec and then organize then into a dom tree ready to be used by the ImageIO metadata mechanism.
- Since:
- 2.3
- Author:
- Simone Giannecchini, GeoSolutions
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGeoTiffIIOMetadataEncoder(int geoTIFFVersion, int keyRevisionMajor, int keyRevisionMinor) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGeoAscii(int keyID, String value) voidaddGeoDoubleParam(int keyID, double value) voidaddGeoDoubleParams(int keyID, double[] values) addGeoShortParam(int keyID, int value) voidaddModelTiePoint(double i, double j, double x, double y) voidaddModelTiePoint(double i, double j, double k, double x, double y, double z) voidprotected static TIFFTaggetAsciiTag(String set, int tagID) getGeoAsciiParam(int keyID) Gives access to the GeoAscii tiff content for the specified GeoKey metatag.protected static TIFFTagdoublegetGeoDoubleParam(int keyID) double[]getGeoDoubleParams(int keyID) double[]getGeoDoubleParams(int keyID, double[] values) protected static TIFFTagprotected static TIFFTaggetGeoKeyEntry(int keyID) getGeoKeyEntryAt(int index) intgetGeoShortParam(int keyID) intintintprotected static TIFFTagdoubledoubledoublegetModelTiePointAt(int index) protected static TIFFTagprotected static TIFFTagdoubleprotected static TIFFTagintintbooleanhasGeoKeyEntry(int keyID) static booleanisTiffUShort(int value) voidsetGeoTIFFVersion(int version) voidsetKeyRevision(int major, int minor) voidsetModelPixelScale(double x, double y) voidsetModelPixelScale(double x, double y, double z) voidsetModelTiePoint(double i, double j, double x, double y) voidsetModelTiePoint(double i, double j, double k, double x, double y, double z) voidsetModelTransformation(AffineTransform rasterToModel) voidsetNoData(double noData) voidsetTiffTagsMetadata(Map<String, String> metadata) Allows to setup metadata by leveraging on Ascii TIFF Tags.
-
Field Details
-
ASCII_SEPARATOR
ASCII_SEPARATOR- See Also:
-
-
Constructor Details
-
GeoTiffIIOMetadataEncoder
public GeoTiffIIOMetadataEncoder() -
GeoTiffIIOMetadataEncoder
public GeoTiffIIOMetadataEncoder(int geoTIFFVersion, int keyRevisionMajor, int keyRevisionMinor)
-
-
Method Details
-
isTiffUShort
public static boolean isTiffUShort(int value) -
getGeoTIFFVersion
public int getGeoTIFFVersion() -
setGeoTIFFVersion
public void setGeoTIFFVersion(int version) -
getKeyRevisionMajor
public int getKeyRevisionMajor() -
getKeyRevisionMinor
public int getKeyRevisionMinor() -
setKeyRevision
public void setKeyRevision(int major, int minor) -
getModelPixelScaleX
public double getModelPixelScaleX() -
getModelPixelScaleY
public double getModelPixelScaleY() -
getModelPixelScaleZ
public double getModelPixelScaleZ() -
setModelPixelScale
public void setModelPixelScale(double x, double y) -
setModelPixelScale
public void setModelPixelScale(double x, double y, double z) -
getNumModelTiePoints
public int getNumModelTiePoints() -
getModelTiePoint
-
getModelTiePointAt
-
setModelTiePoint
public void setModelTiePoint(double i, double j, double x, double y) -
setModelTiePoint
public void setModelTiePoint(double i, double j, double k, double x, double y, double z) -
addModelTiePoint
public void addModelTiePoint(double i, double j, double x, double y) -
addModelTiePoint
public void addModelTiePoint(double i, double j, double k, double x, double y, double z) -
getNumGeoKeyEntries
public int getNumGeoKeyEntries() -
getGeoKeyEntryAt
-
getGeoKeyEntry
-
hasGeoKeyEntry
public boolean hasGeoKeyEntry(int keyID) -
getGeoShortParam
public int getGeoShortParam(int keyID) -
getGeoDoubleParam
public double getGeoDoubleParam(int keyID) -
getGeoDoubleParams
public double[] getGeoDoubleParams(int keyID) -
getGeoDoubleParams
public double[] getGeoDoubleParams(int keyID, double[] values) -
getGeoAsciiParam
Gives access to the GeoAscii tiff content for the specified GeoKey metatag.Returns
nullin case the ascii params is not present.- Parameters:
keyID- the MetaTag to look for.- Returns:
nullin case the ascii params is not present, otherwise the metatag content.
-
addGeoShortParam
-
addGeoDoubleParam
public void addGeoDoubleParam(int keyID, double value) -
addGeoDoubleParams
public void addGeoDoubleParams(int keyID, double[] values) -
addGeoAscii
-
assignTo
-
createRootTree
-
getGeoKeyDirectoryTag
protected static TIFFTag getGeoKeyDirectoryTag() -
getGeoDoubleParamsTag
protected static TIFFTag getGeoDoubleParamsTag() -
getGeoAsciiParamsTag
protected static TIFFTag getGeoAsciiParamsTag() -
getModelPixelScaleTag
protected static TIFFTag getModelPixelScaleTag() -
getModelTiePointTag
protected static TIFFTag getModelTiePointTag() -
getModelTransformationTag
protected static TIFFTag getModelTransformationTag() -
getAsciiTag
-
getNoDataTag
protected static TIFFTag getNoDataTag() -
setModelTransformation
-
getNoData
public double getNoData() -
setNoData
public void setNoData(double noData) -
setTiffTagsMetadata
Allows to setup metadata by leveraging on Ascii TIFF Tags.
-