Skip to content

Instantly share code, notes, and snippets.

View murphym18's full-sized avatar

Michael Murphy murphym18

  • University of Notre Dame in Indiana
  • San Francisco-Oakland-Berkeley, CA MSA
View GitHub Profile
@murphym18
murphym18 / geoid.py
Created March 22, 2021 01:19 — forked from pyRobShrk/geoid.py
Python classes to calculate geoid height in meters NAVD 88 (Geoid 12b) and EGM 96
import numpy as np
from scipy.interpolate import RectBivariateSpline as Spline
import pygeodesy as geo
from pygeodesy.ellipsoidalVincenty import LatLon
class Geoid12B(): #NAD 83 Ellipsoid
# https://www.ngs.noaa.gov/GEOID/GEOID12B/GEOID12B_CONUS.shtml
# Download a Geoid Grid in little endian binary format ('g2012bu5.bin')
def __init__(self, leBinFile):
glamn, glomn, dla, dlo = np.fromfile(leBinFile,'<f8',4)