NTv2 .gsb file reader & interpolator #51
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Python script reads the binary NTv2 file for AUSGeoid2020, finds the four surrounding nodes for the coordinates supplied and performs bilinear or bicubic interpolation (based on user input, or bicubic if not specified) . The output is a tuple of the ellipsoid to AHD separation, deflection in the prime meridian and deflection in the prime vertical values in that order (NAHD, ξ, η).
The script contains 2 classes with multiple functions, but only NTv2ReaderBinary().ntv2reader(file, lat, lon, interpolation_method) needs to be called, where:
• file is the complete file location as a string
• lat is the latitude of the point of interest in decimal degrees
• lon is the longitude of the point of interest in decimal degrees
• interpolation_method is either ‘bilinear’ or ‘bicubic’ (by default it is set to ‘bicubic’, so this parameter isn’t mandatory).
The script also contains 2 stand alone functions - one for bilinear and one for bicubic interpolation.
Signed-off-by: Jaimie Dodd jaimie.dodd@dnrme.qld.gov.au