Class NTV2
java.lang.Object
org.locationtech.proj4j.datum.NTV2
Parser for the "National Transformation" v2 format
Very basic implementation: only files with 1 subfile are supported, gridshift type is supposed to be in
seconds
Header structure:
0 8 16 |NUM_OREC|iiii | |NUM_SREC|iiii | |NUM_FILE|iiii | |GS_TYPE |ssssssss| |VERSION |ssssssss| |SYSTEM_F|ssssssss| |SYSTEM_T|ssssssss| |MAJOR_F |dddddddd| |MINOR_F |dddddddd| |MAJOR_T |dddddddd| |MINOR_T |dddddddd|Subfile header:
|SUB_NAME|ssssssss| |PARENT |ssssssss| |CREATED |ssssssss| |UPDATED |ssssssss| |S_LAT |dddddddd| |N_LAT |dddddddd| |E_LONG |dddddddd| |W_LONG |dddddddd| |LAT_INC |dddddddd| |LONG_INC|dddddddd| |GS_COUNT|iiii |Grid shift records
|dddd|dddd|dddd|dddd|End of File record
|END |dddddddd|
- Author:
- Bart Hanssens
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Grid.ConversionTableinit(DataInputStream instream) Initialize conversion tablestatic voidload(DataInputStream instream, Grid grid) Load grid(sub)file into gridstatic booleantestHeader(byte[] header) Use header to check file type
-
Constructor Details
-
NTV2
public NTV2()
-
-
Method Details
-
testHeader
public static boolean testHeader(byte[] header) Use header to check file type- Parameters:
header-- Returns:
- true if format is NTv2
-
init
Initialize conversion table- Parameters:
instream-- Returns:
- Throws:
IOException
-
load
Load grid(sub)file into grid- Parameters:
instream-grid-- Throws:
IOException
-