public class NTV2GridShiftFileWrapper extends java.lang.Object
NTV2GridShiftFile
.
Loads the shift file from disk, when it is first accessed.Modifier and Type | Field and Description |
---|---|
private java.lang.String |
gridFileName |
private NTV2GridShiftFile |
instance |
static float |
NTV2_SOURCE_PRIORITY_DOWNLOAD |
static float |
NTV2_SOURCE_PRIORITY_LOCAL |
private static java.util.Map<java.lang.Float,NTV2GridShiftFileSource> |
sources |
Constructor and Description |
---|
NTV2GridShiftFileWrapper(java.lang.String filename)
Constructs a new
NTV2GridShiftFileWrapper . |
Modifier and Type | Method and Description |
---|---|
NTV2GridShiftFile |
getShiftFile()
Returns the actual
NTV2GridShiftFile behind this wrapper. |
static void |
registerNTV2GridShiftFileSource(float priority,
NTV2GridShiftFileSource source)
Register a source for NTV2 grid files.
|
private NTV2GridShiftFile instance
private final java.lang.String gridFileName
public static final float NTV2_SOURCE_PRIORITY_LOCAL
public static final float NTV2_SOURCE_PRIORITY_DOWNLOAD
private static java.util.Map<java.lang.Float,NTV2GridShiftFileSource> sources
public NTV2GridShiftFileWrapper(java.lang.String filename)
NTV2GridShiftFileWrapper
.filename
- Path to the grid file (GSB format)public static void registerNTV2GridShiftFileSource(float priority, NTV2GridShiftFileSource source)
priority
- the priority, sources with higher priority are checked first;
use NTV2_SOURCE_PRIORITY_LOCAL
for local files and
NTV2_SOURCE_PRIORITY_DOWNLOAD
for remote downloadssource
- the NTV2 grid file sourcepublic NTV2GridShiftFile getShiftFile() throws java.io.IOException
NTV2GridShiftFile
behind this wrapper.
The grid file is only loaded once, when first accessed.java.io.IOException
- if the grid file cannot be found/loaded