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

Replace gdal +osr with rasterio + pyproj #365

Merged
merged 4 commits into from
Oct 22, 2022
Merged

Replace gdal +osr with rasterio + pyproj #365

merged 4 commits into from
Oct 22, 2022

Conversation

piyushrpt
Copy link
Collaborator

Description

As per discussion

  • Replace gdal with rasterio
  • Replace osr with pyproj
  • Hopefully, final set of general changes before details of Raytracing are flushed out

Motivation and Context

  • Use one set of tools consistently
  • We had a mix of these tools in the repo before

How Has This Been Tested?

  • All unit tests have been appropriately updated
  • Golden datasets were tested against and nothing changed numerically
  • Added a couple of TODOs to highlight spots to revisit. Some external scripts like prepFromAria.py might need more testing.

@piyushrpt piyushrpt requested a review from jlmaurer October 21, 2022 17:37
@@ -100,51 +98,47 @@ def ecef2enu(xyz, lat, lon, height):
return np.stack((e, n, u), axis=-1)


def gdal_extents(fname):
def rio_extents(fname):
if os.path.exists(fname + '.vrt'):
fname = fname + '.vrt'
Copy link
Collaborator

Choose a reason for hiding this comment

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

This may not be needed anymore. We were facing an issue where gdal wouldn't read certain attributes from the .dat file but would from the .vrt file. I think it was mainly the NoDataValue. I don't think rasterio has this limitation; @cmarshak do you happen to know?

@jlmaurer jlmaurer self-requested a review October 22, 2022 03:43
@jlmaurer jlmaurer merged commit 42d08bb into dev Oct 22, 2022
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