Skip to content

Conversation

@JaimieDodd
Copy link
Contributor

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

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>
@BatchelorJ
Copy link
Contributor

See issue #16

@JackMcCubbineGA
Copy link
Contributor

JackMcCubbineGA commented Mar 26, 2019

This works exactly as described. I crossed checked the results of the interpolation for both the bi-linear and bi-cubic methods against independent software and got the same result to 3 dp.

@harry093 harry093 merged commit 010e8db into GeoscienceAustralia:master Mar 26, 2019
This was referenced Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants