GeoscienceAustralia / GeodePy

A toolkit for Geodesy and Surveying in Python
Apache License 2.0
91 stars 47 forks source link

re-introduce ntv2reader.py module #126

Closed nicgowans closed 3 years ago

nicgowans commented 3 years ago

Re-introduces the ntv2reader.py module, adapted from earlier code.

Changes include:

nicgowans commented 3 years ago

@harry093 That's supported in this pull request, though not by name, and it requires the user specify the gsb file. In practice, it could look something like:

from geodepy.ntv2reader import read_ntv2_file
from geodepy.transform import ntv2_2d

# initialise data
lat_lon = (-34.0, 145.0)
gsb_file = r'C:\path_to_file\GDA94_GDA2020_conformal_and_distortion.gsb'

# create Ntv2Grid object from ntv2 grid file
ntv2_grid = read_ntv2_file(gsb_file)

# transform using grid shifts
tf_lat_lon = ntv2_2d(ntv2_grid, lat_lon[0], lat_lon[1], forward_tf=True, method='bicubic')

Were you thinking of a function that points to a gsb file in aws?

harry093 commented 3 years ago

@nicgowans I hadn't really thought about it in detail, but it's a capability that GeodePy should have

BatchelorJ commented 3 years ago

Great stuff @nicgowans! I recall that Jack has implemented something that reads gsb's in AWS, but it uses GDAL for performance (see #89).

nicgowans commented 3 years ago

Thanks, @BatchelorJ .

I think you might have the EHGT/AVWS/AHD transformation functions in mind? They read the .tif files in AVWS.

And I run into issues with CURL and SSL certificates when I try to call them, but maybe that's just an issue for me? ERROR 11: CURL error: SSL certificate problem: unable to get local issuer certificate

harry093 commented 3 years ago

@JackMcCubbine can you help @nicgowans?