public class NITFUtilities extends Object
Modifier and Type | Class and Description |
---|---|
static class |
NITFUtilities.Consts
Constants
|
static class |
NITFUtilities.WriteCompression |
Constructor and Description |
---|
NITFUtilities() |
Modifier and Type | Method and Description |
---|---|
static JP2KKakaduImageWriteParam |
getCompressionParam(JP2KKakaduImageWriter kakaduWriter,
NITFUtilities.WriteCompression compression,
boolean isMulti)
Setup a proper set of JP2K writing parameters depending on the type of requested compression.
|
static boolean |
isNITFAvailable()
Returns
true if the NITF native library has been loaded. |
static void |
loadNITF()
Forces loading of NITF libs.
|
static void |
setField(String fieldName,
nitf.Field field,
byte[] fieldValue)
Set the specified fieldName, represented by the specified Field, with the provided fieldValue
Note that the fieldName parameter is only used for logging/exceptions purposes.
|
static void |
setField(String fieldName,
nitf.Field field,
byte[] fieldValue,
boolean doValidation)
Set the specified fieldName, represented by the specified Field, with the provided fieldValue
Note that the fieldName parameter is only used for logging/exceptions purposes.
|
static void |
setField(String fieldName,
nitf.Field field,
String fieldValue)
Set the specified fieldName, represented by the specified Field, with the provided fieldValue
Note that the fieldName parameter is only used for logging/exceptions purposes.
|
static void |
setField(String fieldName,
nitf.Field field,
String fieldValue,
boolean doValidation)
Set the specified fieldName, represented by the specified Field, with the provided fieldValue
Note that the fieldName parameter is only used for logging/exceptions purposes.
|
static void |
setTREField(nitf.TRE tre,
String fieldName,
String fieldValue,
boolean doValidation)
Set a field in the specified TRE
|
static void |
setTREFieldDirect(nitf.TRE tre,
String fieldName,
String fieldValue)
Set a field in the specified TRE
|
public static boolean isNITFAvailable()
true
if the NITF native library has been loaded. false
otherwise.true
only if the NITF native library has been loaded.public static void loadNITF()
public static JP2KKakaduImageWriteParam getCompressionParam(JP2KKakaduImageWriter kakaduWriter, NITFUtilities.WriteCompression compression, boolean isMulti)
kakaduWriter
- a writer instance to get default write parameters.compression
- the type of NITFUtilities.WriteCompression
desiredisMulti
- whether the image to be compressed is multi band or pancromatic.JP2KKakaduImageWriteParam
instance with proper writing parameters.public static void setTREField(nitf.TRE tre, String fieldName, String fieldValue, boolean doValidation) throws nitf.NITFException
tre
- the TRE to be setfieldName
- the name of the field to be setfieldValue
- the value to be set for that fielddoValidation
- true
to check if the provided value is compliant
with the field properties (length and type).nitf.NITFException
public static void setTREFieldDirect(nitf.TRE tre, String fieldName, String fieldValue) throws nitf.NITFException
tre
- the TRE to be setfieldName
- the name of the field to be setfieldValue
- the value to be set for that fieldnitf.NITFException
#setTREField(TRE, String, String, boolean)}
public static void setField(String fieldName, nitf.Field field, String fieldValue)
fieldName
- the name to be shown in case some exception occursfield
- the field to be setfieldValue
- the value, as a String
, to be assigned to that fieldpublic static void setField(String fieldName, nitf.Field field, byte[] fieldValue)
fieldName
- the name to be shown in case some exception occursfield
- the field to be setfieldValue
- the value, as a byte[]
, to be assigned to that fieldpublic static void setField(String fieldName, nitf.Field field, String fieldValue, boolean doValidation)
doValidation
param.fieldName
- the name to be shown in case some exception occursfield
- the field to be setfieldValue
- the value, as a String
, to be assigned to that fielddoValidation
- if true
check the fieldValue is compliant with the field
propertiespublic static void setField(String fieldName, nitf.Field field, byte[] fieldValue, boolean doValidation)
doValidation
param.fieldName
- the name to be shown in case some exception occursfield
- the field to be setfieldValue
- the value, as a String
, to be assigned to that fielddoValidation
- if true
check the fieldValue is compliant with the field
propertiesCopyright © 2006–2015 GeoSolutions. All rights reserved.