Package org.apache.sis.storage.geotiff
Class NativeMetadata
java.lang.Object
org.apache.sis.storage.geotiff.GeoKeysLoader
org.apache.sis.storage.geotiff.NativeMetadata
View over GeoTIFF tags and GeoTIFF keys in their "raw" form (without interpretation).
Used only when showing native metadata.
This implementation is inefficient because it performs a lot of "seek" operations. This class does not make any effort for reading data in a more sequential way. The performance penalty should not matter because this class should not be used except for debugging purposes (the normal use is to interpret tags as they are read).
This class is thread-safe if the user does not try to write in the tree.
- Since:
- 1.2
- Version:
- 1.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final TableColumn
<Integer> Column for the tag number or GeoKey number.private TreeTable.Node
The node for GeoKeys, ornull
if none.private ChannelDataInput
The stream from which to read the data.private boolean
true
if reading classic TIFF file, orfalse
for BigTIFF.(package private) static final TableColumn
<CharSequence> Column for the name associated to the tag.(package private) static final TableColumn
<Object> Column for the value associated to the tag.private final Vocabulary
Resources for vocabulary.Fields inherited from class org.apache.sis.storage.geotiff.GeoKeysLoader
asciiParameters, keyDirectory, logger, majorRevision, minorRevision, numericParameters, SEPARATOR
-
Constructor Summary
ConstructorsConstructorDescriptionNativeMetadata
(Locale locale) Creates a reader for a tree table of native metadata. -
Method Summary
Modifier and TypeMethodDescription(package private) final DefaultTreeTable
Reads the tree table content.private long
readInt
(boolean isShort) Reads theshort
,int
orlong
value (depending if the file is standard of big TIFF) at the current Reader.input position.private static Object
toString
(Object value, IntFunction<Enum<?>> valueOf, Enum<?> unknown) Replaces an integer code by its enumeration value if that value is different thanunknown
.private void
Write child values ingeoNode
if non-null.Methods inherited from class org.apache.sis.storage.geotiff.GeoKeysLoader
load, setAsciiParameters
-
Field Details
-
CODE
Column for the tag number or GeoKey number. -
NAME
Column for the name associated to the tag. Value may be null if the name is unknown. -
VALUE
Column for the value associated to the tag. -
input
The stream from which to read the data. -
isClassic
private boolean isClassictrue
if reading classic TIFF file, orfalse
for BigTIFF. -
geoNode
The node for GeoKeys, ornull
if none.- See Also:
-
vocabulary
Resources for vocabulary.
-
-
Constructor Details
-
NativeMetadata
NativeMetadata(Locale locale) Creates a reader for a tree table of native metadata.
-
-
Method Details
-
read
Reads the tree table content. This method assumes that the caller already verified that the file is a GeoTIFF file. Tags are keys are added in the order they are declared in the file.- Throws:
IOException
-
readInt
Reads theshort
,int
orlong
value (depending if the file is standard of big TIFF) at the current Reader.input position.- Throws:
IOException
-
toString
Replaces an integer code by its enumeration value if that value is different thanunknown
. -
writeGeoKeys
private void writeGeoKeys()Write child values ingeoNode
if non-null.
-