Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-introduce ntv2reader.py module #126

Merged
merged 3 commits into from
Mar 28, 2021

Conversation

nicgowans
Copy link
Contributor

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

Changes include:

  • Support for 2D transformation grids
  • Support for multiple subgrids
  • All four ntv2 fields now reported
  • New 2D grid transformation function ntv2_2d introduced to transform.py module

nicgowans and others added 3 commits March 26, 2021 08:12
Adapted from previous work by Jaimie Dodd and expanded for 2D ntv2 grids.

ntv2_2d function added to transform.py
Copy link
Collaborator

@harry093 harry093 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nicgowans. With a little more work will this allow us to do conformal+distortion transformations?

@nicgowans
Copy link
Contributor Author

@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
Copy link
Collaborator

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

@harry093 harry093 merged commit 23a3b39 into GeoscienceAustralia:master Mar 28, 2021
@BatchelorJ
Copy link
Collaborator

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
Copy link
Contributor Author

nicgowans commented Mar 28, 2021

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
Copy link
Collaborator

@JackMcCubbine can you help @nicgowans?

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.

3 participants