public class GeoTiffIIOMetadataEncoder extends Object
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.
Modifier and Type | Class and Description |
---|---|
static class |
GeoTiffIIOMetadataEncoder.TagSet |
Modifier and Type | Field and Description |
---|---|
static String |
ASCII_SEPARATOR
ASCII_SEPARATOR
|
Constructor and Description |
---|
GeoTiffIIOMetadataEncoder() |
GeoTiffIIOMetadataEncoder(int geoTIFFVersion,
int keyRevisionMajor,
int keyRevisionMinor) |
Modifier and Type | Method and Description |
---|---|
void |
addGeoAscii(int keyID,
String value) |
void |
addGeoDoubleParam(int keyID,
double value) |
void |
addGeoDoubleParams(int keyID,
double[] values) |
GeoKeyEntry |
addGeoShortParam(int keyID,
int value) |
void |
addModelTiePoint(double i,
double j,
double x,
double y) |
void |
addModelTiePoint(double i,
double j,
double k,
double x,
double y,
double z) |
void |
assignTo(Element element) |
Element |
createRootTree() |
protected static TIFFTag |
getAsciiTag(String set,
int tagID) |
String |
getGeoAsciiParam(int keyID)
Gives access to the GeoAscii tiff content for the specified GeoKey metatag.
|
protected static TIFFTag |
getGeoAsciiParamsTag() |
double |
getGeoDoubleParam(int keyID) |
double[] |
getGeoDoubleParams(int keyID) |
double[] |
getGeoDoubleParams(int keyID,
double[] values) |
protected static TIFFTag |
getGeoDoubleParamsTag() |
protected static TIFFTag |
getGeoKeyDirectoryTag() |
GeoKeyEntry |
getGeoKeyEntry(int keyID) |
GeoKeyEntry |
getGeoKeyEntryAt(int index) |
int |
getGeoShortParam(int keyID) |
int |
getGeoTIFFVersion() |
int |
getKeyRevisionMajor() |
int |
getKeyRevisionMinor() |
protected static TIFFTag |
getModelPixelScaleTag() |
double |
getModelPixelScaleX() |
double |
getModelPixelScaleY() |
double |
getModelPixelScaleZ() |
TiePoint |
getModelTiePoint() |
TiePoint |
getModelTiePointAt(int index) |
protected static TIFFTag |
getModelTiePointTag() |
protected static TIFFTag |
getModelTransformationTag() |
double |
getNoData() |
protected static TIFFTag |
getNoDataTag() |
int |
getNumGeoKeyEntries() |
int |
getNumModelTiePoints() |
boolean |
hasGeoKeyEntry(int keyID) |
static boolean |
isTiffUShort(int value) |
void |
setGeoTIFFVersion(int version) |
void |
setKeyRevision(int major,
int minor) |
void |
setModelPixelScale(double x,
double y) |
void |
setModelPixelScale(double x,
double y,
double z) |
void |
setModelTiePoint(double i,
double j,
double x,
double y) |
void |
setModelTiePoint(double i,
double j,
double k,
double x,
double y,
double z) |
void |
setModelTransformation(AffineTransform rasterToModel) |
void |
setNoData(double noData) |
void |
setTiffTagsMetadata(Map<String,String> metadata)
Allows to setup metadata by leveraging on Ascii TIFF Tags.
|
public static final String ASCII_SEPARATOR
public GeoTiffIIOMetadataEncoder()
public GeoTiffIIOMetadataEncoder(int geoTIFFVersion, int keyRevisionMajor, int keyRevisionMinor)
public static boolean isTiffUShort(int value)
public int getGeoTIFFVersion()
public void setGeoTIFFVersion(int version)
public int getKeyRevisionMajor()
public int getKeyRevisionMinor()
public void setKeyRevision(int major, int minor)
public double getModelPixelScaleX()
public double getModelPixelScaleY()
public double getModelPixelScaleZ()
public void setModelPixelScale(double x, double y)
public void setModelPixelScale(double x, double y, double z)
public int getNumModelTiePoints()
public TiePoint getModelTiePoint()
public TiePoint getModelTiePointAt(int index)
public void setModelTiePoint(double i, double j, double x, double y)
public void setModelTiePoint(double i, double j, double k, double x, double y, double z)
public void addModelTiePoint(double i, double j, double x, double y)
public void addModelTiePoint(double i, double j, double k, double x, double y, double z)
public int getNumGeoKeyEntries()
public GeoKeyEntry getGeoKeyEntryAt(int index)
public GeoKeyEntry getGeoKeyEntry(int keyID)
public boolean hasGeoKeyEntry(int keyID)
public int getGeoShortParam(int keyID)
public double getGeoDoubleParam(int keyID)
public double[] getGeoDoubleParams(int keyID)
public double[] getGeoDoubleParams(int keyID, double[] values)
public String getGeoAsciiParam(int keyID)
Returns null
in case the ascii params is not present.
keyID
- the MetaTag to look for.null
in case the ascii params is not present, otherwise the metatag
content.public GeoKeyEntry addGeoShortParam(int keyID, int value)
public void addGeoDoubleParam(int keyID, double value)
public void addGeoDoubleParams(int keyID, double[] values)
public void addGeoAscii(int keyID, String value)
public void assignTo(Element element)
public Element createRootTree()
protected static TIFFTag getGeoKeyDirectoryTag()
protected static TIFFTag getGeoDoubleParamsTag()
protected static TIFFTag getGeoAsciiParamsTag()
protected static TIFFTag getModelPixelScaleTag()
protected static TIFFTag getModelTiePointTag()
protected static TIFFTag getModelTransformationTag()
protected static TIFFTag getAsciiTag(String set, int tagID)
protected static TIFFTag getNoDataTag()
public void setModelTransformation(AffineTransform rasterToModel)
public double getNoData()
public void setNoData(double noData)
public void setTiffTagsMetadata(Map<String,String> metadata)
name
- is the Ascii TIFF Tag identifier. It can be a String representing: 1) a simple
Integer (referring to a tag ID) (in that case it will refer to the BaselineTIFFTagSet 2)
OR an identifier in the form: TIFFTagSet:TIFFTagID. As an instance:
"BaselineTIFFTagSet:305" in order to add the Copyright info.value
- is the value to be assigned to that metadata.GeoTiffIIOMetadataEncoder.TagSet
Copyright © 1996–2019 Geotools. All rights reserved.