diff --git a/docs/defs.html b/docs/defs.html index 71c8ac6..720d8e4 100644 --- a/docs/defs.html +++ b/docs/defs.html @@ -140,7 +140,7 @@
-pyegt.defs.MODEL_LIST: list
+pyegt.defs.MODEL_LIST: list

The full list of models from NGS and VDatum APIs described here, concatenated from pyegt.defs.NGS_MODELS and pyegt.defs.VDATUM_MODELS:

diff --git a/docs/height.html b/docs/height.html index 752e79b..5162443 100644 --- a/docs/height.html +++ b/docs/height.html @@ -112,7 +112,7 @@

pyegt.height

-class pyegt.height.HeightModel(lat: float, lon: float, region: str | Literal[None] | None = None, from_model: str | Literal[None] | None = None, from_vrs: CRS | Literal[None] | None = None, from_wkt: str | Literal[None] | None = None, from_epsg: str | int | Literal[None] | None = None)
+class pyegt.height.HeightModel(lat: float, lon: float, region: str | Literal[None] | None = None, from_model: str | Literal[None] | None = None, from_vrs: CRS | Literal[None] | None = None, from_wkt: str | Literal[None] | None = None, from_epsg: str | int | Literal[None] | None = None)

Look up the geoid, tidal, or geopotential model height above the ellipsoid in order to convert model-referenced heights to ellipsoid height (i.e. compatible with Cesium) and vice-versa.

@@ -143,56 +143,56 @@
Parameters:
Raises:
-

AttributeError – if more than one of [from_model, from_vrs, from_wkt, from_epsg] is set

+

AttributeError – if more than one of [from_model, from_vrs, from_wkt, from_epsg] is set

-__eq__(_HeightModel__value: object) bool
-

Use math.isclose() to compare as floating point numbers are not always directly comparable.

+__eq__(_HeightModel__value: object) bool +

Use math.isclose() to compare as floating point numbers are not always directly comparable.

Returns:

Boolean equality of two floats

Return type:
-

bool

+

bool

Raises:
-

ValueError – if no self.height value exists

+

ValueError – if no self.height value exists

-__float__() float
+__float__() float

Convert to float.

Returns:

Height value (if exists)

Return type:
-

float

+

float

Raises:
-

ValueError – if no self.height value exists

+

ValueError – if no self.height value exists

-__repr__() str
+__repr__() str

Convert to printable representation, for example:

>>> from pyegt.height import HeightModel
 >>> h = HeightModel(lat=64.506181, lon=-165.399282, from_model='EGM2008', region='ak')
@@ -205,84 +205,84 @@
 

repr() value

Return type:
-

str

+

str

-__str__() str
+__str__() str

Convert to string.

Returns:

String representation of height or "n/a"

Return type:
-

str

+

str

-as_dict() dict
+as_dict() dict

Return JSON object as dict using __dict__.

Returns:

JSON object

Return type:
-

dict

+

dict

-as_float() float
+as_float() float

Convert to float using __float__.

Returns:

Height value (if exists)

Return type:
-

float

+

float

-as_string() str
+as_string() str

Convert to string using __str__.

Returns:

The height value in meters represented in string format

Return type:
-

str

+

str

-available_models() list
+available_models() list

Return a list of available geoid and tidal models.

Returns:

List of models

Return type:
-

list

+

list

-available_regions() list
+available_regions() list

Return a list of regions usable with VDatum models. See VDatum regions in the docs.

@@ -296,31 +296,31 @@

List of regions

Return type:
-

list

+

list

-from_epsg(epsg: str | int | Literal[None])
+from_epsg(epsg: str | int | Literal[None])

Compute the height above the ellipsoid for the given EPSG code.

Parameters:
-

epsg (str or int or None) – EPSG code indicating a vertical reference system

+

epsg (str or int or None) – EPSG code indicating a vertical reference system

Returns:

The modeled geoid height above the ellipsoid

Return type:
-

float

+

float

-from_model(model: str | Literal[None] | None = None)
+from_model(model: str | Literal[None] | None = None)

Compute the height above the ellipsoid for the given model name. Will set self.model if the model variable is supplied. Finally, it will call self.get_height().

@@ -348,91 +348,91 @@ VDatum APIs.

Parameters:
-

model (str or None) – Model to use for lookup

+

model (str or None) – Model to use for lookup

Returns:

The height of the given model in the given location

Return type:
-

float

+

float

Raises:
-

AttributeError – if no model has been set

+

AttributeError – if no model has been set

-from_vrs(vrs: CRS | Literal[None])
+from_vrs(vrs: CRS | Literal[None])

Compute the height above the ellipsoid for the given vertical reference system.

Parameters:
-

vrs (pyproj.crs.CRS or None) – Vertical reference system

+

vrs (pyproj.crs.CRS or None) – Vertical reference system

Returns:

The modeled geoid height above the ellipsoid

Return type:
-

float

+

float

Raises:
-

AttributeError – if no VRS has been set

+

AttributeError – if no VRS has been set

-from_wkt(wkt: str | Literal[None])
+from_wkt(wkt: str | Literal[None])

Compute the height above the ellipsoid for the given well-known text VRS.

Parameters:
-

wkt (str or None) – Well-known text describing a vertical reference system

+

wkt (str or None) – Well-known text describing a vertical reference system

Returns:

The modeled geoid height above the ellipsoid

Return type:
-

float

+

float

-get_height() float
+get_height() float

Get the height in meters of the given self.model above the ellipsoid.

Returns:

The modeled geoid height above the ellipsoid

Return type:
-

float

+

float

Raises:
-

ValueError – if no model is found matching self.model

+

ValueError – if no model is found matching self.model

-in_cm() float
+in_cm() float

Convert to centimeters (self.height * 100).

Returns:

Height value in cm (if it exists)

Return type:
-

float

+

float

-in_feet() float
+in_feet() float

Convert to imperial foot (for US survey feet use in_feet_us_survey()). 1 imperial foot = 0.999998 US survey feet

@@ -440,14 +440,14 @@

Height value in ft (if it exists)

Return type:
-

float

+

float

-in_feet_us_survey() float
+in_feet_us_survey() float

Convert to US survey foot (for imperial feet use in_feet()). 1 imperial foot = 0.999998 US survey feet

@@ -455,24 +455,24 @@

Height value in usft (if it exists)

Return type:
-

float

+

float

-verify_model() bool
+verify_model() bool

Search for a model in the list of known models.

Parameters:
-

vrs (str) – The search term, potentially a phrase containing the model name; ex: EGM2008 height will return EGM2008

+

vrs (str) – The search term, potentially a phrase containing the model name; ex: EGM2008 height will return EGM2008

Returns:

Returns the correctly formatted model name to use in the API query

Return type:
-

str

+

str

diff --git a/docs/searchindex.js b/docs/searchindex.js index 2ce7c6f..82ac1a7 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["about", "defs", "height", "index", "install", "lookups", "test", "utils"], "filenames": ["about.rst", "defs.rst", "height.rst", "index.rst", "install.rst", "lookups.rst", "test.rst", "utils.rst"], "titles": ["1. About pyegt", "pyegt.defs", "pyegt.height", "pyegt 0.1.2", "2. Installation", "3. Using pyegt", "pyegt.test", "pyegt.utils"], "terms": {"ncea": [0, 3], "cesium": [0, 2, 3], "i": [0, 2, 3, 4, 5, 7], "an": [0, 2, 3, 6, 7], "open": [0, 3], "sourc": [0, 3], "program": [0, 3], "develop": [0, 3], "look": [0, 2, 3], "up": [0, 2, 3, 4], "geoid": [0, 1, 2, 3, 5, 7], "tidal": [0, 1, 2, 3, 5, 7], "geopotenti": [0, 2, 3, 7], "model": [0, 1, 2, 3, 5, 7], "height": [0, 3, 5, 6, 7], "abov": [0, 2, 3], "ellipsoid": [0, 2, 3, 5], "order": [0, 2, 3], "convert": [0, 2, 3], "referenc": [0, 2, 3], "e": [0, 2, 3], "compat": [0, 2, 3], "vice": [0, 2, 3], "versa": [0, 2, 3], "The": [0, 1, 2, 4, 5, 7], "follow": [0, 2, 4, 5, 6], "figur": [0, 2], "demonstr": [0, 2], "differ": [0, 2], "between": [0, 2], "topograph": [0, 2], "ground": [0, 2], "surfac": [0, 2], "diagram": [0, 2], "show": [0, 2], "conceptu": [0, 2], "h": [0, 2, 5], "rel": [0, 2, 3], "n": [0, 2, 4], "along": [0, 2], "grei": [0, 2], "gener": [0, 2, 7], "us": [0, 1, 2, 3, 4, 7], "global": [0, 2], "project": [0, 2], "due": [0, 2], "its": [0, 2], "small": [0, 2], "digit": [0, 2], "footprint": [0, 2], "eas": [0, 2], "calcul": [0, 2], "system": [0, 2], "base": [0, 2], "graviti": [0, 2], "howev": [0, 2], "tide": [0, 2], "ar": [0, 2, 4, 5], "influenc": [0, 2], "local": [0, 2], "earth": [0, 2], "": [0, 2], "densiti": [0, 2], "other": [0, 2], "factor": [0, 2], "therefor": [0, 2], "some": [0, 2], "prefer": [0, 2], "refer": [0, 1, 2], "which": [0, 2], "provid": [0, 2], "much": [0, 2], "easier": [0, 2], "framework": [0, 2], "understand": [0, 2], "exampl": [0, 2, 5, 7], "mean": [0, 2], "sea": [0, 2], "level": [0, 2], "potenti": [0, 2], "from": [0, 1, 2, 3, 5, 6, 7], "requir": [0, 2], "know": [0, 2], "convers": [0, 2], "simpl": [0, 2], "addit": [0, 2], "valu": [0, 2, 6], "lookup": [0, 2, 5, 7], "perform": [0, 2, 5], "heightmodel": [0, 2, 3, 5, 6], "class": [0, 2], "either": [0, 2, 4], "ng": [0, 1, 2, 5, 7], "vdatum": [0, 1, 2, 5, 7], "api": [0, 1, 2, 5, 7], "wrapper": [0, 5], "around": 0, "all": [0, 5], "function": [0, 5], "those": 0, "ha": [0, 2, 7], "been": [0, 2], "includ": 0, "thi": [0, 2], "softwar": [0, 5], "pleas": 0, "read": 0, "document": [0, 2], "consid": 0, "contribut": 0, "codebas": 0, "you": [0, 4], "feel": 0, "strongli": 0, "miss": 0, "featur": 0, "ngs_model": [1, 3, 7], "g99sss": [1, 2], "2": 1, "geoid03": [1, 2], "3": [1, 4, 7], "geoid06": [1, 2], "5": [1, 6], "geoid09": [1, 2], "7": [1, 6], "geoid12a": [1, 2], "12": 1, "geoid12b": [1, 2, 5, 6], "13": 1, "geoid18": [1, 2], "14": 1, "geoid99": [1, 2], "1": [1, 2, 4], "usgg2003": [1, 2], "4": 1, "usgg2009": [1, 2], "6": [1, 2], "usgg2012": [1, 2], "11": 1, "xushg": [1, 2], "9": 1, "noaa": [1, 5], "number": [1, 2], "map": 1, "region": [1, 2, 3, 5, 6, 7], "contigu": [1, 2, 5, 6], "ak": [1, 2, 6], "seak": [1, 2], "chesapeak_delawar": [1, 2], "westcoast": [1, 2], "gcnmi": [1, 2], "hi": [1, 2], "prvi": [1, 2, 6], "sgi": [1, 2], "spi": [1, 2], "sli": [1, 2], "list": [1, 2, 7], "vdatum_model": [1, 3, 7], "navd88": [1, 2, 7], "ngvd29": [1, 2], "asvd02": [1, 2], "w0_usgg2012": [1, 2], "guvd04": [1, 2], "nmvd03": [1, 2], "prvd02": [1, 2], "vivd09": [1, 2], "crd": [1, 2], "egm2008": [1, 2, 5, 6, 7], "egm1996": [1, 2], "egm1984": [1, 2], "xgeoid16b": [1, 2], "xgeoid17b": [1, 2], "xgeoid18b": [1, 2], "xgeoid19b": [1, 2], "xgeoid20b": [1, 2], "igld85": [1, 2], "lwd_igld85": [1, 2], "ohwm_igld85": [1, 2], "lmsl": [1, 2], "mllw": [1, 2], "mlw": [1, 2], "mtl": [1, 2], "dtl": [1, 2], "mhw": [1, 2], "mhhw": [1, 2], "lwd": [1, 2], "nad27": [1, 2], "nad83_1986": [1, 2], "nad83_2011": [1, 2], "nad83_nsrs2007": [1, 2], "nad83_marp00": [1, 2], "nad83_pacp00": [1, 2], "wgs84_g1674": [1, 2], "itrf2014": [1, 2], "igs14": [1, 2], "itrf2008": [1, 2], "igs08": [1, 2], "itrf2005": [1, 2], "igs2005": [1, 2], "wgs84_g1150": [1, 2], "itrf2000": [1, 2], "igs00": [1, 2], "igb00": [1, 2], "itrf96": [1, 2], "wgs84_g873": [1, 2], "itrf94": [1, 2], "itrf93": [1, 2], "itrf92": [1, 2], "siomit92": [1, 2], "wgs84_g730": [1, 2], "itrf91": [1, 2], "itrf90": [1, 2], "itrf89": [1, 2], "itrf88": [1, 2], "wgs84_transit": [1, 2], "wgs84_g1762": [1, 2], "wgs84_g2139": [1, 2], "vertic": [1, 2], "frame": 1, "index": [1, 2, 3, 6, 7], "search": [1, 2, 3, 6, 7], "page": [1, 2, 3, 6, 7], "back": [1, 2, 6, 7], "top": [1, 2, 6, 7], "lat": [2, 5, 6, 7], "float": [2, 5, 7], "lon": [2, 5, 6, 7], "str": [2, 7], "liter": [2, 7], "none": [2, 5, 7], "from_model": [2, 5, 6], "from_vr": 2, "cr": 2, "from_wkt": 2, "from_epsg": 2, "int": [2, 7], "paramet": [2, 6, 7], "decim": [2, 7], "latitud": [2, 7], "longitud": [2, 7], "see": [2, 3, 7], "available_region": 2, "pyproj": [2, 4], "is_vert": 2, "must": [2, 5], "true": 2, "main": 2, "sub": 2, "well": 2, "known": 2, "text": 2, "get": [2, 7], "vr": [2, 7], "epsg": 2, "code": [2, 4, 7], "as_dict": 2, "dict": [2, 7], "return": [2, 6, 7], "json": [2, 7], "object": [2, 5], "__dict__": 2, "type": [2, 7], "as_float": 2, "__float__": 2, "exist": 2, "as_str": 2, "string": 2, "__str__": 2, "available_model": 2, "avail": 2, "usabl": 2, "doc": 2, "comput": 2, "given": [2, 7], "Will": 2, "set": [2, 4, 7], "self": 2, "variabl": 2, "suppli": [2, 5], "final": 2, "call": 2, "get_height": 2, "valid": [2, 7], "can": [2, 4, 5], "found": [2, 7], "here": [1, 2], "wkt": 2, "in_cm": 2, "centimet": 2, "cm": 2, "in_feet": 2, "imperi": 2, "foot": 2, "u": [2, 6, 7], "survei": [2, 7], "feet": [2, 7], "in_feet_us_survei": [2, 5], "0": [2, 4], "999998": 2, "ft": 2, "usft": 2, "verify_model": 2, "bool": 2, "term": [2, 7], "phrase": 2, "contain": [2, 7], "name": [2, 7], "ex": 2, "correctli": 2, "format": 2, "queri": [2, 5, 7], "http": [3, 4], "github": [3, 4], "com": [3, 4], "iannesbitt": [3, 4], "ian": 3, "nesbitt": 3, "ucsb": 3, "For": 3, "more": [2, 3], "inform": 3, "about": 3, "section": 3, "instal": 3, "pip": 3, "conda": 3, "def": [3, 7], "test": 3, "util": [3, 5], "get_ngs_json": [3, 7], "get_ngs_url": [3, 7], "get_vdatum_json": [3, 7], "get_vdatum_url": [3, 7], "request": 4, "pyegt": 4, "onli": 4, "depend": 4, "To": 4, "creat": 4, "your": 4, "virtual": 4, "environ": 4, "run": [4, 6], "anaconda": 4, "miniconda": 4, "packag": 4, "itself": 4, "specif": [4, 5], "channel": 4, "c": 4, "new": 4, "latest": 4, "commit": 4, "manual": 4, "execut": 4, "git": 4, "clone": 4, "cd": 4, "Or": 4, "directli": [2, 4], "design": 5, "easi": 5, "simpli": 5, "initi": 5, "datum": 5, "against": 5, "import": [2, 5, 6], "44": [5, 6], "256616": [5, 6], "73": [5, 6], "964784": [5, 6], "28": [5, 6], "157": [5, 6], "meter": [2, 5], "92": 5, "37842416572809": 5, "also": 5, "899": [5, 6], "argument": 5, "If": [5, 6], "user": 5, "default": 5, "highli": 5, "doe": 5, "Its": 5, "sole": 5, "locat": [2, 5], "try": [], "pr": 6, "coordin": 6, "ngs_url": 7, "applic": 7, "url": 7, "vdatum_url": 7, "definit": 1, "model_search": [3, 7], "rais": [2, 7], "attributeerror": [2, 7], "geoidheight": 7, "connectionerror": 7, "tri": 7, "respons": 7, "error": [6, 7], "egm": 7, "bad_nam": 7, "navd": 7, "88": 7, "A": 7, "verifi": 7, "indic": [2, 7], "describ": [1, 2], "64": [2, 6], "486036": 6, "165": [2, 6], "292154": 6, "18": 6, "47131": 6, "66": 6, "136544": 6, "expect": 6, "expected_valu": 6, "43": 6, "285": 6, "005": 6, "45": 6, "473": 6, "construct": 7, "servic": 7, "model_list": [1, 3, 7], "valueerror": 2, "match": 2, "100": 2, "than": 2, "one": 2, "invalid": 7, "ani": 6, "fail": 6, "script": 6, "exit": 6, "after": 6, "print": 6, "result": 6, "full": 1, "amalgam": [], "both": [], "concaten": 1, "repres": 2, "__eq__": 2, "_heightmodel__valu": 2, "math": 2, "isclos": 2, "compar": 2, "point": 2, "alwai": 2, "boolean": 2, "equal": 2, "two": 2, "__repr__": 2, "printabl": 2, "represent": 2, "506181": 2, "399282": 2, "repr": 2, "998": 2}, "objects": {"pyegt": [[1, 0, 0, "-", "defs"], [2, 0, 0, "-", "height"], [6, 0, 0, "-", "test"], [7, 0, 0, "-", "utils"]], "pyegt.defs": [[1, 1, 1, "", "MODEL_LIST"], [1, 1, 1, "", "NGS_MODELS"], [1, 1, 1, "", "REGIONS"], [1, 1, 1, "", "VDATUM_MODELS"]], "pyegt.height": [[2, 2, 1, "", "HeightModel"]], "pyegt.height.HeightModel": [[2, 3, 1, "", "__eq__"], [2, 3, 1, "", "__float__"], [2, 3, 1, "", "__repr__"], [2, 3, 1, "", "__str__"], [2, 3, 1, "", "as_dict"], [2, 3, 1, "", "as_float"], [2, 3, 1, "", "as_string"], [2, 3, 1, "", "available_models"], [2, 3, 1, "", "available_regions"], [2, 3, 1, "", "from_epsg"], [2, 3, 1, "", "from_model"], [2, 3, 1, "", "from_vrs"], [2, 3, 1, "", "from_wkt"], [2, 3, 1, "", "get_height"], [2, 3, 1, "", "in_cm"], [2, 3, 1, "", "in_feet"], [2, 3, 1, "", "in_feet_us_survey"], [2, 3, 1, "", "verify_model"]], "pyegt.test": [[6, 4, 1, "", "test"]], "pyegt.utils": [[7, 4, 1, "", "get_ngs_json"], [7, 4, 1, "", "get_ngs_url"], [7, 4, 1, "", "get_vdatum_json"], [7, 4, 1, "", "get_vdatum_url"], [7, 4, 1, "", "model_search"]]}, "objtypes": {"0": "py:module", "1": "py:data", "2": "py:class", "3": "py:method", "4": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "data", "Python data"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"], "4": ["py", "function", "Python function"]}, "titleterms": {"about": 0, "pyegt": [0, 1, 2, 3, 5, 6, 7], "def": 1, "height": 2, "0": 3, "1": 3, "resourc": 3, "librari": 3, "lookup": 3, "instal": 4, "pip": 4, "conda": 4, "from": 4, "sourc": 4, "us": 5, "test": 6, "util": 7, "2": 3}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.todo": 2, "sphinx": 57}, "alltitles": {"About pyegt": [[0, "about-pyegt"]], "pyegt 0.1.2": [[3, "pyegt-version"]], "Resources": [[3, null]], "Library": [[3, null]], "Lookups": [[3, "lookups"]], "Installation": [[4, "installation"]], "pip": [[4, "pip"]], "conda": [[4, "conda"]], "From source": [[4, "from-source"]], "Using pyegt": [[5, "using-pyegt"]], "pyegt.utils": [[7, "module-pyegt.utils"]], "pyegt.defs": [[1, "module-pyegt.defs"]], "pyegt.test": [[6, "module-pyegt.test"]], "pyegt.height": [[2, "module-pyegt.height"]]}, "indexentries": {"heightmodel (class in pyegt.height)": [[2, "pyegt.height.HeightModel"]], "__eq__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__eq__"]], "__float__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__float__"]], "__repr__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__repr__"]], "__str__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__str__"]], "as_dict() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.as_dict"]], "as_float() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.as_float"]], "as_string() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.as_string"]], "available_models() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.available_models"]], "available_regions() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.available_regions"]], "from_epsg() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_epsg"]], "from_model() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_model"]], "from_vrs() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_vrs"]], "from_wkt() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_wkt"]], "get_height() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.get_height"]], "in_cm() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.in_cm"]], "in_feet() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.in_feet"]], "in_feet_us_survey() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.in_feet_us_survey"]], "module": [[2, "module-pyegt.height"]], "pyegt.height": [[2, "module-pyegt.height"]], "verify_model() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.verify_model"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["about", "defs", "height", "index", "install", "lookups", "test", "utils"], "filenames": ["about.rst", "defs.rst", "height.rst", "index.rst", "install.rst", "lookups.rst", "test.rst", "utils.rst"], "titles": ["1. About pyegt", "pyegt.defs", "pyegt.height", "pyegt 0.1.2", "2. Installation", "3. Using pyegt", "pyegt.test", "pyegt.utils"], "terms": {"ncea": [0, 3], "cesium": [0, 2, 3], "i": [0, 2, 3, 4, 5, 7], "an": [0, 2, 3, 6, 7], "open": [0, 3], "sourc": [0, 3], "program": [0, 3], "develop": [0, 3], "look": [0, 2, 3], "up": [0, 2, 3, 4], "geoid": [0, 1, 2, 3, 5, 7], "tidal": [0, 1, 2, 3, 5, 7], "geopotenti": [0, 2, 3, 7], "model": [0, 1, 2, 3, 5, 7], "height": [0, 3, 5, 6, 7], "abov": [0, 2, 3], "ellipsoid": [0, 2, 3, 5], "order": [0, 2, 3], "convert": [0, 2, 3], "referenc": [0, 2, 3], "e": [0, 2, 3], "compat": [0, 2, 3], "vice": [0, 2, 3], "versa": [0, 2, 3], "The": [0, 1, 2, 4, 5, 7], "follow": [0, 2, 4, 5, 6], "figur": [0, 2], "demonstr": [0, 2], "differ": [0, 2], "between": [0, 2], "topograph": [0, 2], "ground": [0, 2], "surfac": [0, 2], "diagram": [0, 2], "show": [0, 2], "conceptu": [0, 2], "h": [0, 2, 5], "rel": [0, 2, 3], "n": [0, 2, 4], "along": [0, 2], "grei": [0, 2], "gener": [0, 2, 7], "us": [0, 1, 2, 3, 4, 7], "global": [0, 2], "project": [0, 2], "due": [0, 2], "its": [0, 2], "small": [0, 2], "digit": [0, 2], "footprint": [0, 2], "eas": [0, 2], "calcul": [0, 2], "system": [0, 2], "base": [0, 2], "graviti": [0, 2], "howev": [0, 2], "tide": [0, 2], "ar": [0, 2, 4, 5], "influenc": [0, 2], "local": [0, 2], "earth": [0, 2], "": [0, 2], "densiti": [0, 2], "other": [0, 2], "factor": [0, 2], "therefor": [0, 2], "some": [0, 2], "prefer": [0, 2], "refer": [0, 1, 2], "which": [0, 2], "provid": [0, 2], "much": [0, 2], "easier": [0, 2], "framework": [0, 2], "understand": [0, 2], "exampl": [0, 2, 5, 7], "mean": [0, 2], "sea": [0, 2], "level": [0, 2], "potenti": [0, 2], "from": [0, 1, 2, 3, 5, 6, 7], "requir": [0, 2], "know": [0, 2], "convers": [0, 2], "simpl": [0, 2], "addit": [0, 2], "valu": [0, 2, 6], "lookup": [0, 2, 5, 7], "perform": [0, 2, 5], "heightmodel": [0, 2, 3, 5, 6], "class": [0, 2], "either": [0, 2, 4], "ng": [0, 1, 2, 5, 7], "vdatum": [0, 1, 2, 5, 7], "api": [0, 1, 2, 5, 7], "wrapper": [0, 5], "around": 0, "all": [0, 5], "function": [0, 5], "those": 0, "ha": [0, 2, 7], "been": [0, 2], "includ": 0, "thi": [0, 2], "softwar": [0, 5], "pleas": 0, "read": 0, "document": [0, 2], "consid": 0, "contribut": 0, "codebas": 0, "you": [0, 4], "feel": 0, "strongli": 0, "miss": 0, "featur": 0, "ngs_model": [1, 3, 7], "g99sss": [1, 2], "2": 1, "geoid03": [1, 2], "3": [1, 4, 7], "geoid06": [1, 2], "5": [1, 6], "geoid09": [1, 2], "7": [1, 6], "geoid12a": [1, 2], "12": 1, "geoid12b": [1, 2, 5, 6], "13": 1, "geoid18": [1, 2], "14": 1, "geoid99": [1, 2], "1": [1, 2, 4], "usgg2003": [1, 2], "4": 1, "usgg2009": [1, 2], "6": [1, 2], "usgg2012": [1, 2], "11": 1, "xushg": [1, 2], "9": 1, "noaa": [1, 5], "number": [1, 2], "map": 1, "region": [1, 2, 3, 5, 6, 7], "contigu": [1, 2, 5, 6], "ak": [1, 2, 6], "seak": [1, 2], "chesapeak_delawar": [1, 2], "westcoast": [1, 2], "gcnmi": [1, 2], "hi": [1, 2], "prvi": [1, 2, 6], "sgi": [1, 2], "spi": [1, 2], "sli": [1, 2], "list": [1, 2, 7], "definit": 1, "vdatum_model": [1, 3, 7], "navd88": [1, 2, 7], "ngvd29": [1, 2], "asvd02": [1, 2], "w0_usgg2012": [1, 2], "guvd04": [1, 2], "nmvd03": [1, 2], "prvd02": [1, 2], "vivd09": [1, 2], "crd": [1, 2], "egm2008": [1, 2, 5, 6, 7], "egm1996": [1, 2], "egm1984": [1, 2], "xgeoid16b": [1, 2], "xgeoid17b": [1, 2], "xgeoid18b": [1, 2], "xgeoid19b": [1, 2], "xgeoid20b": [1, 2], "igld85": [1, 2], "lwd_igld85": [1, 2], "ohwm_igld85": [1, 2], "lmsl": [1, 2], "mllw": [1, 2], "mlw": [1, 2], "mtl": [1, 2], "dtl": [1, 2], "mhw": [1, 2], "mhhw": [1, 2], "lwd": [1, 2], "nad27": [1, 2], "nad83_1986": [1, 2], "nad83_2011": [1, 2], "nad83_nsrs2007": [1, 2], "nad83_marp00": [1, 2], "nad83_pacp00": [1, 2], "wgs84_g1674": [1, 2], "itrf2014": [1, 2], "igs14": [1, 2], "itrf2008": [1, 2], "igs08": [1, 2], "itrf2005": [1, 2], "igs2005": [1, 2], "wgs84_g1150": [1, 2], "itrf2000": [1, 2], "igs00": [1, 2], "igb00": [1, 2], "itrf96": [1, 2], "wgs84_g873": [1, 2], "itrf94": [1, 2], "itrf93": [1, 2], "itrf92": [1, 2], "siomit92": [1, 2], "wgs84_g730": [1, 2], "itrf91": [1, 2], "itrf90": [1, 2], "itrf89": [1, 2], "itrf88": [1, 2], "wgs84_transit": [1, 2], "wgs84_g1762": [1, 2], "wgs84_g2139": [1, 2], "vertic": [1, 2], "frame": 1, "model_list": [1, 3, 7], "full": 1, "describ": [1, 2], "here": [1, 2], "concaten": 1, "index": [1, 2, 3, 6, 7], "search": [1, 2, 3, 6, 7], "page": [1, 2, 3, 6, 7], "back": [1, 2, 6, 7], "top": [1, 2, 6, 7], "lat": [2, 5, 6, 7], "float": [2, 5, 7], "lon": [2, 5, 6, 7], "str": [2, 7], "liter": [2, 7], "none": [2, 5, 7], "from_model": [2, 5, 6], "from_vr": 2, "cr": 2, "from_wkt": 2, "from_epsg": 2, "int": [2, 7], "paramet": [2, 6, 7], "decim": [2, 7], "latitud": [2, 7], "longitud": [2, 7], "see": [2, 3, 7], "available_region": 2, "pyproj": [2, 4], "is_vert": 2, "must": [2, 5], "true": 2, "main": 2, "sub": 2, "well": 2, "known": 2, "text": 2, "get": [2, 7], "vr": [2, 7], "epsg": 2, "code": [2, 4, 7], "rais": [2, 7], "attributeerror": [2, 7], "more": [2, 3], "than": 2, "one": 2, "set": [2, 4, 7], "__eq__": 2, "_heightmodel__valu": 2, "object": [2, 5], "bool": 2, "math": 2, "isclos": 2, "compar": 2, "point": 2, "alwai": 2, "directli": [2, 4], "return": [2, 6, 7], "boolean": 2, "equal": 2, "two": 2, "type": [2, 7], "valueerror": 2, "self": 2, "exist": 2, "__float__": 2, "__repr__": 2, "printabl": 2, "represent": 2, "import": [2, 5, 6], "64": [2, 6], "506181": 2, "165": [2, 6], "399282": 2, "repr": 2, "998": 2, "meter": [2, 5], "__str__": 2, "string": 2, "as_dict": 2, "dict": [2, 7], "json": [2, 7], "__dict__": 2, "as_float": 2, "as_str": 2, "repres": 2, "format": 2, "available_model": 2, "avail": 2, "usabl": 2, "doc": 2, "comput": 2, "given": [2, 7], "indic": [2, 7], "name": [2, 7], "Will": 2, "variabl": 2, "suppli": [2, 5], "final": 2, "call": 2, "get_height": 2, "valid": [2, 7], "can": [2, 4, 5], "found": [2, 7], "locat": [2, 5], "wkt": 2, "match": 2, "in_cm": 2, "centimet": 2, "100": 2, "cm": 2, "in_feet": 2, "imperi": 2, "foot": 2, "u": [2, 6, 7], "survei": [2, 7], "feet": [2, 7], "in_feet_us_survei": [2, 5], "0": [2, 4], "999998": 2, "ft": 2, "usft": 2, "verify_model": 2, "term": [2, 7], "phrase": 2, "contain": [2, 7], "ex": 2, "correctli": 2, "queri": [2, 5, 7], "http": [3, 4], "github": [3, 4], "com": [3, 4], "iannesbitt": [3, 4], "ian": 3, "nesbitt": 3, "ucsb": 3, "For": 3, "inform": 3, "about": 3, "section": 3, "instal": 3, "pip": 3, "conda": 3, "def": [3, 7], "test": 3, "util": [3, 5], "get_ngs_json": [3, 7], "get_ngs_url": [3, 7], "get_vdatum_json": [3, 7], "get_vdatum_url": [3, 7], "model_search": [3, 7], "request": 4, "pyegt": 4, "onli": 4, "depend": 4, "To": 4, "creat": 4, "your": 4, "virtual": 4, "environ": 4, "run": [4, 6], "anaconda": 4, "miniconda": 4, "packag": 4, "itself": 4, "specif": [4, 5], "channel": 4, "c": 4, "new": 4, "latest": 4, "commit": 4, "manual": 4, "execut": 4, "git": 4, "clone": 4, "cd": 4, "Or": 4, "design": 5, "easi": 5, "simpli": 5, "initi": 5, "datum": 5, "against": 5, "44": [5, 6], "256616": [5, 6], "73": [5, 6], "964784": [5, 6], "28": [5, 6], "157": [5, 6], "92": 5, "37842416572809": 5, "also": 5, "899": [5, 6], "argument": 5, "If": [5, 6], "user": 5, "default": 5, "highli": 5, "doe": 5, "Its": 5, "sole": 5, "pr": 6, "coordin": 6, "486036": 6, "292154": 6, "18": 6, "47131": 6, "66": 6, "136544": 6, "expect": 6, "expected_valu": 6, "43": 6, "285": 6, "005": 6, "45": 6, "473": 6, "ani": 6, "fail": 6, "script": 6, "exit": 6, "error": [6, 7], "after": 6, "print": 6, "result": 6, "ngs_url": 7, "url": 7, "respons": 7, "applic": 7, "geoidheight": 7, "connectionerror": 7, "tri": 7, "construct": 7, "servic": 7, "vdatum_url": 7, "invalid": 7, "egm": 7, "egmi": 7, "3855": 7, "bad_nam": 7, "navd": 7, "88": 7, "A": 7, "verifi": 7}, "objects": {"pyegt": [[1, 0, 0, "-", "defs"], [2, 0, 0, "-", "height"], [6, 0, 0, "-", "test"], [7, 0, 0, "-", "utils"]], "pyegt.defs": [[1, 1, 1, "", "MODEL_LIST"], [1, 1, 1, "", "NGS_MODELS"], [1, 1, 1, "", "REGIONS"], [1, 1, 1, "", "VDATUM_MODELS"]], "pyegt.height": [[2, 2, 1, "", "HeightModel"]], "pyegt.height.HeightModel": [[2, 3, 1, "", "__eq__"], [2, 3, 1, "", "__float__"], [2, 3, 1, "", "__repr__"], [2, 3, 1, "", "__str__"], [2, 3, 1, "", "as_dict"], [2, 3, 1, "", "as_float"], [2, 3, 1, "", "as_string"], [2, 3, 1, "", "available_models"], [2, 3, 1, "", "available_regions"], [2, 3, 1, "", "from_epsg"], [2, 3, 1, "", "from_model"], [2, 3, 1, "", "from_vrs"], [2, 3, 1, "", "from_wkt"], [2, 3, 1, "", "get_height"], [2, 3, 1, "", "in_cm"], [2, 3, 1, "", "in_feet"], [2, 3, 1, "", "in_feet_us_survey"], [2, 3, 1, "", "verify_model"]], "pyegt.test": [[6, 4, 1, "", "test"]], "pyegt.utils": [[7, 4, 1, "", "get_ngs_json"], [7, 4, 1, "", "get_ngs_url"], [7, 4, 1, "", "get_vdatum_json"], [7, 4, 1, "", "get_vdatum_url"], [7, 4, 1, "", "model_search"]]}, "objtypes": {"0": "py:module", "1": "py:data", "2": "py:class", "3": "py:method", "4": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "data", "Python data"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"], "4": ["py", "function", "Python function"]}, "titleterms": {"about": 0, "pyegt": [0, 1, 2, 3, 5, 6, 7], "def": 1, "height": 2, "0": 3, "1": 3, "2": 3, "resourc": 3, "librari": 3, "lookup": 3, "instal": 4, "pip": 4, "conda": 4, "from": 4, "sourc": 4, "us": 5, "test": 6, "util": 7}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.todo": 2, "sphinx": 57}, "alltitles": {"About pyegt": [[0, "about-pyegt"]], "pyegt.defs": [[1, "module-pyegt.defs"]], "pyegt.height": [[2, "module-pyegt.height"]], "pyegt 0.1.2": [[3, "pyegt-version"]], "Resources": [[3, null]], "Library": [[3, null]], "Lookups": [[3, "lookups"]], "Installation": [[4, "installation"]], "pip": [[4, "pip"]], "conda": [[4, "conda"]], "From source": [[4, "from-source"]], "Using pyegt": [[5, "using-pyegt"]], "pyegt.test": [[6, "module-pyegt.test"]], "pyegt.utils": [[7, "module-pyegt.utils"]]}, "indexentries": {"model_list (in module pyegt.defs)": [[1, "pyegt.defs.MODEL_LIST"]], "ngs_models (in module pyegt.defs)": [[1, "pyegt.defs.NGS_MODELS"]], "regions (in module pyegt.defs)": [[1, "pyegt.defs.REGIONS"]], "vdatum_models (in module pyegt.defs)": [[1, "pyegt.defs.VDATUM_MODELS"]], "module": [[1, "module-pyegt.defs"], [2, "module-pyegt.height"], [6, "module-pyegt.test"], [7, "module-pyegt.utils"]], "pyegt.defs": [[1, "module-pyegt.defs"]], "heightmodel (class in pyegt.height)": [[2, "pyegt.height.HeightModel"]], "__eq__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__eq__"]], "__float__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__float__"]], "__repr__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__repr__"]], "__str__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__str__"]], "as_dict() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.as_dict"]], "as_float() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.as_float"]], "as_string() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.as_string"]], "available_models() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.available_models"]], "available_regions() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.available_regions"]], "from_epsg() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_epsg"]], "from_model() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_model"]], "from_vrs() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_vrs"]], "from_wkt() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_wkt"]], "get_height() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.get_height"]], "in_cm() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.in_cm"]], "in_feet() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.in_feet"]], "in_feet_us_survey() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.in_feet_us_survey"]], "pyegt.height": [[2, "module-pyegt.height"]], "verify_model() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.verify_model"]], "pyegt.test": [[6, "module-pyegt.test"]], "test() (in module pyegt.test)": [[6, "pyegt.test.test"]], "get_ngs_json() (in module pyegt.utils)": [[7, "pyegt.utils.get_ngs_json"]], "get_ngs_url() (in module pyegt.utils)": [[7, "pyegt.utils.get_ngs_url"]], "get_vdatum_json() (in module pyegt.utils)": [[7, "pyegt.utils.get_vdatum_json"]], "get_vdatum_url() (in module pyegt.utils)": [[7, "pyegt.utils.get_vdatum_url"]], "model_search() (in module pyegt.utils)": [[7, "pyegt.utils.model_search"]], "pyegt.utils": [[7, "module-pyegt.utils"]]}}) \ No newline at end of file diff --git a/docs/utils.html b/docs/utils.html index 2ffc0f3..dcb6019 100644 --- a/docs/utils.html +++ b/docs/utils.html @@ -95,11 +95,11 @@

pyegt.utils

-pyegt.utils.get_ngs_json(ngs_url: str) dict
+pyegt.utils.get_ngs_json(ngs_url: str) dict

Use a given NGS API URL to get a response, and return the response if valid.

Parameters:
-

ngs_url (str) – The NGS query URL

+

ngs_url (str) – The NGS query URL

Returns:

The returned json (if applicable)

@@ -109,8 +109,8 @@
Raises:
@@ -118,47 +118,47 @@
-pyegt.utils.get_ngs_url(lat: float, lon: float, ngs_model: int) str
+pyegt.utils.get_ngs_url(lat: float, lon: float, ngs_model: int) str

Construct the API URL that will be used to query the NGS service.

Parameters:
    -
  • lat (float) – Decimal latitude

  • -
  • lon (float) – Decimal longitude

  • -
  • ngs_model (str) – The NGS geoid model to use for lookup (see list)

  • +
  • lat (float) – Decimal latitude

  • +
  • lon (float) – Decimal longitude

  • +
  • ngs_model (str) – The NGS geoid model to use for lookup (see list)

Returns:

The query url to use in lookup

Return type:
-

str

+

str

-pyegt.utils.get_vdatum_json(vdatum_url, region) dict
+pyegt.utils.get_vdatum_json(vdatum_url, region) dict

Use a given VDatum API URL to get a response, and return the response if valid.

Parameters:
    -
  • vdatum_url (str) – The VDatum query URL

  • -
  • region (str) – The region to search

  • +
  • vdatum_url (str) – The VDatum query URL

  • +
  • region (str) – The region to search

Returns:

JSON response from VDatum API

Return type:
-

dict

+

dict

Raises:
    -
  • AttributeError – if the returned JSON has an error indicating the set region is invalid

  • -
  • AttributeError – if the returned JSON has a generic error code

  • -
  • ConnectionError – if no VDatum JSON is returned in 3 tries

  • +
  • AttributeError – if the returned JSON has an error indicating the set region is invalid

  • +
  • AttributeError – if the returned JSON has a generic error code

  • +
  • ConnectionError – if no VDatum JSON is returned in 3 tries

@@ -166,34 +166,37 @@
-pyegt.utils.get_vdatum_url(lat: float, lon: float, vdatum_model: str, region: str) str
+pyegt.utils.get_vdatum_url(lat: float, lon: float, vdatum_model: str, region: str) str

Construct the API URL that will be used to query the VDatum service.

Parameters:
    -
  • lat (float) – Decimal latitude

  • -
  • lon (float) – Decimal longitude

  • -
  • vdatum_model (str) – The VDatum geoid, tidal, or geopotential model to use for lookup (see list at pyegt.defs.MODEL_LIST)

  • -
  • region (str) – The region to search

  • +
  • lat (float) – Decimal latitude

  • +
  • lon (float) – Decimal longitude

  • +
  • vdatum_model (str) – The VDatum geoid, tidal, or geopotential model to use for lookup (see list at pyegt.defs.MODEL_LIST)

  • +
  • region (str) – The region to search

Returns:

The VDatum query URL

Return type:
-

str

+

str

+pyegt.utils.model_search(vrs: str | None = None) str | Literal[None]

Get a model name from a search term containing that name.

Example:

>>> egm = "EGM2008 height"
 >>> model_search(vrs=egm)
 "EGM2008"
+>>> egmi = 3855
+>>> model_search(vrs=egmi)
+"EGM2008"
 >>> navd88 = "NAVD88 (US Survey Feet)"
 >>> model_search(vrs=navd88)
 "NAVD88"
@@ -204,13 +207,13 @@
 
Parameters:
-

vrs (str) – The search term containing the model name

+

vrs (str) – The search term containing the model name

Returns:

A verified model name or None if none is found

Return type:
-

str or None

+

str or None

diff --git a/docsrc/_build/doctrees/environment.pickle b/docsrc/_build/doctrees/environment.pickle index 6ab9b8f..272e3e3 100644 Binary files a/docsrc/_build/doctrees/environment.pickle and b/docsrc/_build/doctrees/environment.pickle differ diff --git a/docsrc/_build/doctrees/utils.doctree b/docsrc/_build/doctrees/utils.doctree index 96e765f..505a48b 100644 Binary files a/docsrc/_build/doctrees/utils.doctree and b/docsrc/_build/doctrees/utils.doctree differ diff --git a/docsrc/_build/html/defs.html b/docsrc/_build/html/defs.html index 71c8ac6..720d8e4 100644 --- a/docsrc/_build/html/defs.html +++ b/docsrc/_build/html/defs.html @@ -140,7 +140,7 @@
-pyegt.defs.MODEL_LIST: list
+pyegt.defs.MODEL_LIST: list

The full list of models from NGS and VDatum APIs described here, concatenated from pyegt.defs.NGS_MODELS and pyegt.defs.VDATUM_MODELS:

diff --git a/docsrc/_build/html/height.html b/docsrc/_build/html/height.html index 752e79b..5162443 100644 --- a/docsrc/_build/html/height.html +++ b/docsrc/_build/html/height.html @@ -112,7 +112,7 @@

pyegt.height

-class pyegt.height.HeightModel(lat: float, lon: float, region: str | Literal[None] | None = None, from_model: str | Literal[None] | None = None, from_vrs: CRS | Literal[None] | None = None, from_wkt: str | Literal[None] | None = None, from_epsg: str | int | Literal[None] | None = None)
+class pyegt.height.HeightModel(lat: float, lon: float, region: str | Literal[None] | None = None, from_model: str | Literal[None] | None = None, from_vrs: CRS | Literal[None] | None = None, from_wkt: str | Literal[None] | None = None, from_epsg: str | int | Literal[None] | None = None)

Look up the geoid, tidal, or geopotential model height above the ellipsoid in order to convert model-referenced heights to ellipsoid height (i.e. compatible with Cesium) and vice-versa.

@@ -143,56 +143,56 @@
Parameters:
Raises:
-

AttributeError – if more than one of [from_model, from_vrs, from_wkt, from_epsg] is set

+

AttributeError – if more than one of [from_model, from_vrs, from_wkt, from_epsg] is set

-__eq__(_HeightModel__value: object) bool
-

Use math.isclose() to compare as floating point numbers are not always directly comparable.

+__eq__(_HeightModel__value: object) bool +

Use math.isclose() to compare as floating point numbers are not always directly comparable.

Returns:

Boolean equality of two floats

Return type:
-

bool

+

bool

Raises:
-

ValueError – if no self.height value exists

+

ValueError – if no self.height value exists

-__float__() float
+__float__() float

Convert to float.

Returns:

Height value (if exists)

Return type:
-

float

+

float

Raises:
-

ValueError – if no self.height value exists

+

ValueError – if no self.height value exists

-__repr__() str
+__repr__() str

Convert to printable representation, for example:

>>> from pyegt.height import HeightModel
 >>> h = HeightModel(lat=64.506181, lon=-165.399282, from_model='EGM2008', region='ak')
@@ -205,84 +205,84 @@
 

repr() value

Return type:
-

str

+

str

-__str__() str
+__str__() str

Convert to string.

Returns:

String representation of height or "n/a"

Return type:
-

str

+

str

-as_dict() dict
+as_dict() dict

Return JSON object as dict using __dict__.

Returns:

JSON object

Return type:
-

dict

+

dict

-as_float() float
+as_float() float

Convert to float using __float__.

Returns:

Height value (if exists)

Return type:
-

float

+

float

-as_string() str
+as_string() str

Convert to string using __str__.

Returns:

The height value in meters represented in string format

Return type:
-

str

+

str

-available_models() list
+available_models() list

Return a list of available geoid and tidal models.

Returns:

List of models

Return type:
-

list

+

list

-available_regions() list
+available_regions() list

Return a list of regions usable with VDatum models. See VDatum regions in the docs.

@@ -296,31 +296,31 @@

List of regions

Return type:
-

list

+

list

-from_epsg(epsg: str | int | Literal[None])
+from_epsg(epsg: str | int | Literal[None])

Compute the height above the ellipsoid for the given EPSG code.

Parameters:
-

epsg (str or int or None) – EPSG code indicating a vertical reference system

+

epsg (str or int or None) – EPSG code indicating a vertical reference system

Returns:

The modeled geoid height above the ellipsoid

Return type:
-

float

+

float

-from_model(model: str | Literal[None] | None = None)
+from_model(model: str | Literal[None] | None = None)

Compute the height above the ellipsoid for the given model name. Will set self.model if the model variable is supplied. Finally, it will call self.get_height().

@@ -348,91 +348,91 @@ VDatum APIs.

Parameters:
-

model (str or None) – Model to use for lookup

+

model (str or None) – Model to use for lookup

Returns:

The height of the given model in the given location

Return type:
-

float

+

float

Raises:
-

AttributeError – if no model has been set

+

AttributeError – if no model has been set

-from_vrs(vrs: CRS | Literal[None])
+from_vrs(vrs: CRS | Literal[None])

Compute the height above the ellipsoid for the given vertical reference system.

Parameters:
-

vrs (pyproj.crs.CRS or None) – Vertical reference system

+

vrs (pyproj.crs.CRS or None) – Vertical reference system

Returns:

The modeled geoid height above the ellipsoid

Return type:
-

float

+

float

Raises:
-

AttributeError – if no VRS has been set

+

AttributeError – if no VRS has been set

-from_wkt(wkt: str | Literal[None])
+from_wkt(wkt: str | Literal[None])

Compute the height above the ellipsoid for the given well-known text VRS.

Parameters:
-

wkt (str or None) – Well-known text describing a vertical reference system

+

wkt (str or None) – Well-known text describing a vertical reference system

Returns:

The modeled geoid height above the ellipsoid

Return type:
-

float

+

float

-get_height() float
+get_height() float

Get the height in meters of the given self.model above the ellipsoid.

Returns:

The modeled geoid height above the ellipsoid

Return type:
-

float

+

float

Raises:
-

ValueError – if no model is found matching self.model

+

ValueError – if no model is found matching self.model

-in_cm() float
+in_cm() float

Convert to centimeters (self.height * 100).

Returns:

Height value in cm (if it exists)

Return type:
-

float

+

float

-in_feet() float
+in_feet() float

Convert to imperial foot (for US survey feet use in_feet_us_survey()). 1 imperial foot = 0.999998 US survey feet

@@ -440,14 +440,14 @@

Height value in ft (if it exists)

Return type:
-

float

+

float

-in_feet_us_survey() float
+in_feet_us_survey() float

Convert to US survey foot (for imperial feet use in_feet()). 1 imperial foot = 0.999998 US survey feet

@@ -455,24 +455,24 @@

Height value in usft (if it exists)

Return type:
-

float

+

float

-verify_model() bool
+verify_model() bool

Search for a model in the list of known models.

Parameters:
-

vrs (str) – The search term, potentially a phrase containing the model name; ex: EGM2008 height will return EGM2008

+

vrs (str) – The search term, potentially a phrase containing the model name; ex: EGM2008 height will return EGM2008

Returns:

Returns the correctly formatted model name to use in the API query

Return type:
-

str

+

str

diff --git a/docsrc/_build/html/searchindex.js b/docsrc/_build/html/searchindex.js index 2ce7c6f..82ac1a7 100644 --- a/docsrc/_build/html/searchindex.js +++ b/docsrc/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["about", "defs", "height", "index", "install", "lookups", "test", "utils"], "filenames": ["about.rst", "defs.rst", "height.rst", "index.rst", "install.rst", "lookups.rst", "test.rst", "utils.rst"], "titles": ["1. About pyegt", "pyegt.defs", "pyegt.height", "pyegt 0.1.2", "2. Installation", "3. Using pyegt", "pyegt.test", "pyegt.utils"], "terms": {"ncea": [0, 3], "cesium": [0, 2, 3], "i": [0, 2, 3, 4, 5, 7], "an": [0, 2, 3, 6, 7], "open": [0, 3], "sourc": [0, 3], "program": [0, 3], "develop": [0, 3], "look": [0, 2, 3], "up": [0, 2, 3, 4], "geoid": [0, 1, 2, 3, 5, 7], "tidal": [0, 1, 2, 3, 5, 7], "geopotenti": [0, 2, 3, 7], "model": [0, 1, 2, 3, 5, 7], "height": [0, 3, 5, 6, 7], "abov": [0, 2, 3], "ellipsoid": [0, 2, 3, 5], "order": [0, 2, 3], "convert": [0, 2, 3], "referenc": [0, 2, 3], "e": [0, 2, 3], "compat": [0, 2, 3], "vice": [0, 2, 3], "versa": [0, 2, 3], "The": [0, 1, 2, 4, 5, 7], "follow": [0, 2, 4, 5, 6], "figur": [0, 2], "demonstr": [0, 2], "differ": [0, 2], "between": [0, 2], "topograph": [0, 2], "ground": [0, 2], "surfac": [0, 2], "diagram": [0, 2], "show": [0, 2], "conceptu": [0, 2], "h": [0, 2, 5], "rel": [0, 2, 3], "n": [0, 2, 4], "along": [0, 2], "grei": [0, 2], "gener": [0, 2, 7], "us": [0, 1, 2, 3, 4, 7], "global": [0, 2], "project": [0, 2], "due": [0, 2], "its": [0, 2], "small": [0, 2], "digit": [0, 2], "footprint": [0, 2], "eas": [0, 2], "calcul": [0, 2], "system": [0, 2], "base": [0, 2], "graviti": [0, 2], "howev": [0, 2], "tide": [0, 2], "ar": [0, 2, 4, 5], "influenc": [0, 2], "local": [0, 2], "earth": [0, 2], "": [0, 2], "densiti": [0, 2], "other": [0, 2], "factor": [0, 2], "therefor": [0, 2], "some": [0, 2], "prefer": [0, 2], "refer": [0, 1, 2], "which": [0, 2], "provid": [0, 2], "much": [0, 2], "easier": [0, 2], "framework": [0, 2], "understand": [0, 2], "exampl": [0, 2, 5, 7], "mean": [0, 2], "sea": [0, 2], "level": [0, 2], "potenti": [0, 2], "from": [0, 1, 2, 3, 5, 6, 7], "requir": [0, 2], "know": [0, 2], "convers": [0, 2], "simpl": [0, 2], "addit": [0, 2], "valu": [0, 2, 6], "lookup": [0, 2, 5, 7], "perform": [0, 2, 5], "heightmodel": [0, 2, 3, 5, 6], "class": [0, 2], "either": [0, 2, 4], "ng": [0, 1, 2, 5, 7], "vdatum": [0, 1, 2, 5, 7], "api": [0, 1, 2, 5, 7], "wrapper": [0, 5], "around": 0, "all": [0, 5], "function": [0, 5], "those": 0, "ha": [0, 2, 7], "been": [0, 2], "includ": 0, "thi": [0, 2], "softwar": [0, 5], "pleas": 0, "read": 0, "document": [0, 2], "consid": 0, "contribut": 0, "codebas": 0, "you": [0, 4], "feel": 0, "strongli": 0, "miss": 0, "featur": 0, "ngs_model": [1, 3, 7], "g99sss": [1, 2], "2": 1, "geoid03": [1, 2], "3": [1, 4, 7], "geoid06": [1, 2], "5": [1, 6], "geoid09": [1, 2], "7": [1, 6], "geoid12a": [1, 2], "12": 1, "geoid12b": [1, 2, 5, 6], "13": 1, "geoid18": [1, 2], "14": 1, "geoid99": [1, 2], "1": [1, 2, 4], "usgg2003": [1, 2], "4": 1, "usgg2009": [1, 2], "6": [1, 2], "usgg2012": [1, 2], "11": 1, "xushg": [1, 2], "9": 1, "noaa": [1, 5], "number": [1, 2], "map": 1, "region": [1, 2, 3, 5, 6, 7], "contigu": [1, 2, 5, 6], "ak": [1, 2, 6], "seak": [1, 2], "chesapeak_delawar": [1, 2], "westcoast": [1, 2], "gcnmi": [1, 2], "hi": [1, 2], "prvi": [1, 2, 6], "sgi": [1, 2], "spi": [1, 2], "sli": [1, 2], "list": [1, 2, 7], "vdatum_model": [1, 3, 7], "navd88": [1, 2, 7], "ngvd29": [1, 2], "asvd02": [1, 2], "w0_usgg2012": [1, 2], "guvd04": [1, 2], "nmvd03": [1, 2], "prvd02": [1, 2], "vivd09": [1, 2], "crd": [1, 2], "egm2008": [1, 2, 5, 6, 7], "egm1996": [1, 2], "egm1984": [1, 2], "xgeoid16b": [1, 2], "xgeoid17b": [1, 2], "xgeoid18b": [1, 2], "xgeoid19b": [1, 2], "xgeoid20b": [1, 2], "igld85": [1, 2], "lwd_igld85": [1, 2], "ohwm_igld85": [1, 2], "lmsl": [1, 2], "mllw": [1, 2], "mlw": [1, 2], "mtl": [1, 2], "dtl": [1, 2], "mhw": [1, 2], "mhhw": [1, 2], "lwd": [1, 2], "nad27": [1, 2], "nad83_1986": [1, 2], "nad83_2011": [1, 2], "nad83_nsrs2007": [1, 2], "nad83_marp00": [1, 2], "nad83_pacp00": [1, 2], "wgs84_g1674": [1, 2], "itrf2014": [1, 2], "igs14": [1, 2], "itrf2008": [1, 2], "igs08": [1, 2], "itrf2005": [1, 2], "igs2005": [1, 2], "wgs84_g1150": [1, 2], "itrf2000": [1, 2], "igs00": [1, 2], "igb00": [1, 2], "itrf96": [1, 2], "wgs84_g873": [1, 2], "itrf94": [1, 2], "itrf93": [1, 2], "itrf92": [1, 2], "siomit92": [1, 2], "wgs84_g730": [1, 2], "itrf91": [1, 2], "itrf90": [1, 2], "itrf89": [1, 2], "itrf88": [1, 2], "wgs84_transit": [1, 2], "wgs84_g1762": [1, 2], "wgs84_g2139": [1, 2], "vertic": [1, 2], "frame": 1, "index": [1, 2, 3, 6, 7], "search": [1, 2, 3, 6, 7], "page": [1, 2, 3, 6, 7], "back": [1, 2, 6, 7], "top": [1, 2, 6, 7], "lat": [2, 5, 6, 7], "float": [2, 5, 7], "lon": [2, 5, 6, 7], "str": [2, 7], "liter": [2, 7], "none": [2, 5, 7], "from_model": [2, 5, 6], "from_vr": 2, "cr": 2, "from_wkt": 2, "from_epsg": 2, "int": [2, 7], "paramet": [2, 6, 7], "decim": [2, 7], "latitud": [2, 7], "longitud": [2, 7], "see": [2, 3, 7], "available_region": 2, "pyproj": [2, 4], "is_vert": 2, "must": [2, 5], "true": 2, "main": 2, "sub": 2, "well": 2, "known": 2, "text": 2, "get": [2, 7], "vr": [2, 7], "epsg": 2, "code": [2, 4, 7], "as_dict": 2, "dict": [2, 7], "return": [2, 6, 7], "json": [2, 7], "object": [2, 5], "__dict__": 2, "type": [2, 7], "as_float": 2, "__float__": 2, "exist": 2, "as_str": 2, "string": 2, "__str__": 2, "available_model": 2, "avail": 2, "usabl": 2, "doc": 2, "comput": 2, "given": [2, 7], "Will": 2, "set": [2, 4, 7], "self": 2, "variabl": 2, "suppli": [2, 5], "final": 2, "call": 2, "get_height": 2, "valid": [2, 7], "can": [2, 4, 5], "found": [2, 7], "here": [1, 2], "wkt": 2, "in_cm": 2, "centimet": 2, "cm": 2, "in_feet": 2, "imperi": 2, "foot": 2, "u": [2, 6, 7], "survei": [2, 7], "feet": [2, 7], "in_feet_us_survei": [2, 5], "0": [2, 4], "999998": 2, "ft": 2, "usft": 2, "verify_model": 2, "bool": 2, "term": [2, 7], "phrase": 2, "contain": [2, 7], "name": [2, 7], "ex": 2, "correctli": 2, "format": 2, "queri": [2, 5, 7], "http": [3, 4], "github": [3, 4], "com": [3, 4], "iannesbitt": [3, 4], "ian": 3, "nesbitt": 3, "ucsb": 3, "For": 3, "more": [2, 3], "inform": 3, "about": 3, "section": 3, "instal": 3, "pip": 3, "conda": 3, "def": [3, 7], "test": 3, "util": [3, 5], "get_ngs_json": [3, 7], "get_ngs_url": [3, 7], "get_vdatum_json": [3, 7], "get_vdatum_url": [3, 7], "request": 4, "pyegt": 4, "onli": 4, "depend": 4, "To": 4, "creat": 4, "your": 4, "virtual": 4, "environ": 4, "run": [4, 6], "anaconda": 4, "miniconda": 4, "packag": 4, "itself": 4, "specif": [4, 5], "channel": 4, "c": 4, "new": 4, "latest": 4, "commit": 4, "manual": 4, "execut": 4, "git": 4, "clone": 4, "cd": 4, "Or": 4, "directli": [2, 4], "design": 5, "easi": 5, "simpli": 5, "initi": 5, "datum": 5, "against": 5, "import": [2, 5, 6], "44": [5, 6], "256616": [5, 6], "73": [5, 6], "964784": [5, 6], "28": [5, 6], "157": [5, 6], "meter": [2, 5], "92": 5, "37842416572809": 5, "also": 5, "899": [5, 6], "argument": 5, "If": [5, 6], "user": 5, "default": 5, "highli": 5, "doe": 5, "Its": 5, "sole": 5, "locat": [2, 5], "try": [], "pr": 6, "coordin": 6, "ngs_url": 7, "applic": 7, "url": 7, "vdatum_url": 7, "definit": 1, "model_search": [3, 7], "rais": [2, 7], "attributeerror": [2, 7], "geoidheight": 7, "connectionerror": 7, "tri": 7, "respons": 7, "error": [6, 7], "egm": 7, "bad_nam": 7, "navd": 7, "88": 7, "A": 7, "verifi": 7, "indic": [2, 7], "describ": [1, 2], "64": [2, 6], "486036": 6, "165": [2, 6], "292154": 6, "18": 6, "47131": 6, "66": 6, "136544": 6, "expect": 6, "expected_valu": 6, "43": 6, "285": 6, "005": 6, "45": 6, "473": 6, "construct": 7, "servic": 7, "model_list": [1, 3, 7], "valueerror": 2, "match": 2, "100": 2, "than": 2, "one": 2, "invalid": 7, "ani": 6, "fail": 6, "script": 6, "exit": 6, "after": 6, "print": 6, "result": 6, "full": 1, "amalgam": [], "both": [], "concaten": 1, "repres": 2, "__eq__": 2, "_heightmodel__valu": 2, "math": 2, "isclos": 2, "compar": 2, "point": 2, "alwai": 2, "boolean": 2, "equal": 2, "two": 2, "__repr__": 2, "printabl": 2, "represent": 2, "506181": 2, "399282": 2, "repr": 2, "998": 2}, "objects": {"pyegt": [[1, 0, 0, "-", "defs"], [2, 0, 0, "-", "height"], [6, 0, 0, "-", "test"], [7, 0, 0, "-", "utils"]], "pyegt.defs": [[1, 1, 1, "", "MODEL_LIST"], [1, 1, 1, "", "NGS_MODELS"], [1, 1, 1, "", "REGIONS"], [1, 1, 1, "", "VDATUM_MODELS"]], "pyegt.height": [[2, 2, 1, "", "HeightModel"]], "pyegt.height.HeightModel": [[2, 3, 1, "", "__eq__"], [2, 3, 1, "", "__float__"], [2, 3, 1, "", "__repr__"], [2, 3, 1, "", "__str__"], [2, 3, 1, "", "as_dict"], [2, 3, 1, "", "as_float"], [2, 3, 1, "", "as_string"], [2, 3, 1, "", "available_models"], [2, 3, 1, "", "available_regions"], [2, 3, 1, "", "from_epsg"], [2, 3, 1, "", "from_model"], [2, 3, 1, "", "from_vrs"], [2, 3, 1, "", "from_wkt"], [2, 3, 1, "", "get_height"], [2, 3, 1, "", "in_cm"], [2, 3, 1, "", "in_feet"], [2, 3, 1, "", "in_feet_us_survey"], [2, 3, 1, "", "verify_model"]], "pyegt.test": [[6, 4, 1, "", "test"]], "pyegt.utils": [[7, 4, 1, "", "get_ngs_json"], [7, 4, 1, "", "get_ngs_url"], [7, 4, 1, "", "get_vdatum_json"], [7, 4, 1, "", "get_vdatum_url"], [7, 4, 1, "", "model_search"]]}, "objtypes": {"0": "py:module", "1": "py:data", "2": "py:class", "3": "py:method", "4": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "data", "Python data"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"], "4": ["py", "function", "Python function"]}, "titleterms": {"about": 0, "pyegt": [0, 1, 2, 3, 5, 6, 7], "def": 1, "height": 2, "0": 3, "1": 3, "resourc": 3, "librari": 3, "lookup": 3, "instal": 4, "pip": 4, "conda": 4, "from": 4, "sourc": 4, "us": 5, "test": 6, "util": 7, "2": 3}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.todo": 2, "sphinx": 57}, "alltitles": {"About pyegt": [[0, "about-pyegt"]], "pyegt 0.1.2": [[3, "pyegt-version"]], "Resources": [[3, null]], "Library": [[3, null]], "Lookups": [[3, "lookups"]], "Installation": [[4, "installation"]], "pip": [[4, "pip"]], "conda": [[4, "conda"]], "From source": [[4, "from-source"]], "Using pyegt": [[5, "using-pyegt"]], "pyegt.utils": [[7, "module-pyegt.utils"]], "pyegt.defs": [[1, "module-pyegt.defs"]], "pyegt.test": [[6, "module-pyegt.test"]], "pyegt.height": [[2, "module-pyegt.height"]]}, "indexentries": {"heightmodel (class in pyegt.height)": [[2, "pyegt.height.HeightModel"]], "__eq__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__eq__"]], "__float__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__float__"]], "__repr__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__repr__"]], "__str__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__str__"]], "as_dict() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.as_dict"]], "as_float() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.as_float"]], "as_string() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.as_string"]], "available_models() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.available_models"]], "available_regions() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.available_regions"]], "from_epsg() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_epsg"]], "from_model() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_model"]], "from_vrs() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_vrs"]], "from_wkt() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_wkt"]], "get_height() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.get_height"]], "in_cm() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.in_cm"]], "in_feet() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.in_feet"]], "in_feet_us_survey() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.in_feet_us_survey"]], "module": [[2, "module-pyegt.height"]], "pyegt.height": [[2, "module-pyegt.height"]], "verify_model() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.verify_model"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["about", "defs", "height", "index", "install", "lookups", "test", "utils"], "filenames": ["about.rst", "defs.rst", "height.rst", "index.rst", "install.rst", "lookups.rst", "test.rst", "utils.rst"], "titles": ["1. About pyegt", "pyegt.defs", "pyegt.height", "pyegt 0.1.2", "2. Installation", "3. Using pyegt", "pyegt.test", "pyegt.utils"], "terms": {"ncea": [0, 3], "cesium": [0, 2, 3], "i": [0, 2, 3, 4, 5, 7], "an": [0, 2, 3, 6, 7], "open": [0, 3], "sourc": [0, 3], "program": [0, 3], "develop": [0, 3], "look": [0, 2, 3], "up": [0, 2, 3, 4], "geoid": [0, 1, 2, 3, 5, 7], "tidal": [0, 1, 2, 3, 5, 7], "geopotenti": [0, 2, 3, 7], "model": [0, 1, 2, 3, 5, 7], "height": [0, 3, 5, 6, 7], "abov": [0, 2, 3], "ellipsoid": [0, 2, 3, 5], "order": [0, 2, 3], "convert": [0, 2, 3], "referenc": [0, 2, 3], "e": [0, 2, 3], "compat": [0, 2, 3], "vice": [0, 2, 3], "versa": [0, 2, 3], "The": [0, 1, 2, 4, 5, 7], "follow": [0, 2, 4, 5, 6], "figur": [0, 2], "demonstr": [0, 2], "differ": [0, 2], "between": [0, 2], "topograph": [0, 2], "ground": [0, 2], "surfac": [0, 2], "diagram": [0, 2], "show": [0, 2], "conceptu": [0, 2], "h": [0, 2, 5], "rel": [0, 2, 3], "n": [0, 2, 4], "along": [0, 2], "grei": [0, 2], "gener": [0, 2, 7], "us": [0, 1, 2, 3, 4, 7], "global": [0, 2], "project": [0, 2], "due": [0, 2], "its": [0, 2], "small": [0, 2], "digit": [0, 2], "footprint": [0, 2], "eas": [0, 2], "calcul": [0, 2], "system": [0, 2], "base": [0, 2], "graviti": [0, 2], "howev": [0, 2], "tide": [0, 2], "ar": [0, 2, 4, 5], "influenc": [0, 2], "local": [0, 2], "earth": [0, 2], "": [0, 2], "densiti": [0, 2], "other": [0, 2], "factor": [0, 2], "therefor": [0, 2], "some": [0, 2], "prefer": [0, 2], "refer": [0, 1, 2], "which": [0, 2], "provid": [0, 2], "much": [0, 2], "easier": [0, 2], "framework": [0, 2], "understand": [0, 2], "exampl": [0, 2, 5, 7], "mean": [0, 2], "sea": [0, 2], "level": [0, 2], "potenti": [0, 2], "from": [0, 1, 2, 3, 5, 6, 7], "requir": [0, 2], "know": [0, 2], "convers": [0, 2], "simpl": [0, 2], "addit": [0, 2], "valu": [0, 2, 6], "lookup": [0, 2, 5, 7], "perform": [0, 2, 5], "heightmodel": [0, 2, 3, 5, 6], "class": [0, 2], "either": [0, 2, 4], "ng": [0, 1, 2, 5, 7], "vdatum": [0, 1, 2, 5, 7], "api": [0, 1, 2, 5, 7], "wrapper": [0, 5], "around": 0, "all": [0, 5], "function": [0, 5], "those": 0, "ha": [0, 2, 7], "been": [0, 2], "includ": 0, "thi": [0, 2], "softwar": [0, 5], "pleas": 0, "read": 0, "document": [0, 2], "consid": 0, "contribut": 0, "codebas": 0, "you": [0, 4], "feel": 0, "strongli": 0, "miss": 0, "featur": 0, "ngs_model": [1, 3, 7], "g99sss": [1, 2], "2": 1, "geoid03": [1, 2], "3": [1, 4, 7], "geoid06": [1, 2], "5": [1, 6], "geoid09": [1, 2], "7": [1, 6], "geoid12a": [1, 2], "12": 1, "geoid12b": [1, 2, 5, 6], "13": 1, "geoid18": [1, 2], "14": 1, "geoid99": [1, 2], "1": [1, 2, 4], "usgg2003": [1, 2], "4": 1, "usgg2009": [1, 2], "6": [1, 2], "usgg2012": [1, 2], "11": 1, "xushg": [1, 2], "9": 1, "noaa": [1, 5], "number": [1, 2], "map": 1, "region": [1, 2, 3, 5, 6, 7], "contigu": [1, 2, 5, 6], "ak": [1, 2, 6], "seak": [1, 2], "chesapeak_delawar": [1, 2], "westcoast": [1, 2], "gcnmi": [1, 2], "hi": [1, 2], "prvi": [1, 2, 6], "sgi": [1, 2], "spi": [1, 2], "sli": [1, 2], "list": [1, 2, 7], "definit": 1, "vdatum_model": [1, 3, 7], "navd88": [1, 2, 7], "ngvd29": [1, 2], "asvd02": [1, 2], "w0_usgg2012": [1, 2], "guvd04": [1, 2], "nmvd03": [1, 2], "prvd02": [1, 2], "vivd09": [1, 2], "crd": [1, 2], "egm2008": [1, 2, 5, 6, 7], "egm1996": [1, 2], "egm1984": [1, 2], "xgeoid16b": [1, 2], "xgeoid17b": [1, 2], "xgeoid18b": [1, 2], "xgeoid19b": [1, 2], "xgeoid20b": [1, 2], "igld85": [1, 2], "lwd_igld85": [1, 2], "ohwm_igld85": [1, 2], "lmsl": [1, 2], "mllw": [1, 2], "mlw": [1, 2], "mtl": [1, 2], "dtl": [1, 2], "mhw": [1, 2], "mhhw": [1, 2], "lwd": [1, 2], "nad27": [1, 2], "nad83_1986": [1, 2], "nad83_2011": [1, 2], "nad83_nsrs2007": [1, 2], "nad83_marp00": [1, 2], "nad83_pacp00": [1, 2], "wgs84_g1674": [1, 2], "itrf2014": [1, 2], "igs14": [1, 2], "itrf2008": [1, 2], "igs08": [1, 2], "itrf2005": [1, 2], "igs2005": [1, 2], "wgs84_g1150": [1, 2], "itrf2000": [1, 2], "igs00": [1, 2], "igb00": [1, 2], "itrf96": [1, 2], "wgs84_g873": [1, 2], "itrf94": [1, 2], "itrf93": [1, 2], "itrf92": [1, 2], "siomit92": [1, 2], "wgs84_g730": [1, 2], "itrf91": [1, 2], "itrf90": [1, 2], "itrf89": [1, 2], "itrf88": [1, 2], "wgs84_transit": [1, 2], "wgs84_g1762": [1, 2], "wgs84_g2139": [1, 2], "vertic": [1, 2], "frame": 1, "model_list": [1, 3, 7], "full": 1, "describ": [1, 2], "here": [1, 2], "concaten": 1, "index": [1, 2, 3, 6, 7], "search": [1, 2, 3, 6, 7], "page": [1, 2, 3, 6, 7], "back": [1, 2, 6, 7], "top": [1, 2, 6, 7], "lat": [2, 5, 6, 7], "float": [2, 5, 7], "lon": [2, 5, 6, 7], "str": [2, 7], "liter": [2, 7], "none": [2, 5, 7], "from_model": [2, 5, 6], "from_vr": 2, "cr": 2, "from_wkt": 2, "from_epsg": 2, "int": [2, 7], "paramet": [2, 6, 7], "decim": [2, 7], "latitud": [2, 7], "longitud": [2, 7], "see": [2, 3, 7], "available_region": 2, "pyproj": [2, 4], "is_vert": 2, "must": [2, 5], "true": 2, "main": 2, "sub": 2, "well": 2, "known": 2, "text": 2, "get": [2, 7], "vr": [2, 7], "epsg": 2, "code": [2, 4, 7], "rais": [2, 7], "attributeerror": [2, 7], "more": [2, 3], "than": 2, "one": 2, "set": [2, 4, 7], "__eq__": 2, "_heightmodel__valu": 2, "object": [2, 5], "bool": 2, "math": 2, "isclos": 2, "compar": 2, "point": 2, "alwai": 2, "directli": [2, 4], "return": [2, 6, 7], "boolean": 2, "equal": 2, "two": 2, "type": [2, 7], "valueerror": 2, "self": 2, "exist": 2, "__float__": 2, "__repr__": 2, "printabl": 2, "represent": 2, "import": [2, 5, 6], "64": [2, 6], "506181": 2, "165": [2, 6], "399282": 2, "repr": 2, "998": 2, "meter": [2, 5], "__str__": 2, "string": 2, "as_dict": 2, "dict": [2, 7], "json": [2, 7], "__dict__": 2, "as_float": 2, "as_str": 2, "repres": 2, "format": 2, "available_model": 2, "avail": 2, "usabl": 2, "doc": 2, "comput": 2, "given": [2, 7], "indic": [2, 7], "name": [2, 7], "Will": 2, "variabl": 2, "suppli": [2, 5], "final": 2, "call": 2, "get_height": 2, "valid": [2, 7], "can": [2, 4, 5], "found": [2, 7], "locat": [2, 5], "wkt": 2, "match": 2, "in_cm": 2, "centimet": 2, "100": 2, "cm": 2, "in_feet": 2, "imperi": 2, "foot": 2, "u": [2, 6, 7], "survei": [2, 7], "feet": [2, 7], "in_feet_us_survei": [2, 5], "0": [2, 4], "999998": 2, "ft": 2, "usft": 2, "verify_model": 2, "term": [2, 7], "phrase": 2, "contain": [2, 7], "ex": 2, "correctli": 2, "queri": [2, 5, 7], "http": [3, 4], "github": [3, 4], "com": [3, 4], "iannesbitt": [3, 4], "ian": 3, "nesbitt": 3, "ucsb": 3, "For": 3, "inform": 3, "about": 3, "section": 3, "instal": 3, "pip": 3, "conda": 3, "def": [3, 7], "test": 3, "util": [3, 5], "get_ngs_json": [3, 7], "get_ngs_url": [3, 7], "get_vdatum_json": [3, 7], "get_vdatum_url": [3, 7], "model_search": [3, 7], "request": 4, "pyegt": 4, "onli": 4, "depend": 4, "To": 4, "creat": 4, "your": 4, "virtual": 4, "environ": 4, "run": [4, 6], "anaconda": 4, "miniconda": 4, "packag": 4, "itself": 4, "specif": [4, 5], "channel": 4, "c": 4, "new": 4, "latest": 4, "commit": 4, "manual": 4, "execut": 4, "git": 4, "clone": 4, "cd": 4, "Or": 4, "design": 5, "easi": 5, "simpli": 5, "initi": 5, "datum": 5, "against": 5, "44": [5, 6], "256616": [5, 6], "73": [5, 6], "964784": [5, 6], "28": [5, 6], "157": [5, 6], "92": 5, "37842416572809": 5, "also": 5, "899": [5, 6], "argument": 5, "If": [5, 6], "user": 5, "default": 5, "highli": 5, "doe": 5, "Its": 5, "sole": 5, "pr": 6, "coordin": 6, "486036": 6, "292154": 6, "18": 6, "47131": 6, "66": 6, "136544": 6, "expect": 6, "expected_valu": 6, "43": 6, "285": 6, "005": 6, "45": 6, "473": 6, "ani": 6, "fail": 6, "script": 6, "exit": 6, "error": [6, 7], "after": 6, "print": 6, "result": 6, "ngs_url": 7, "url": 7, "respons": 7, "applic": 7, "geoidheight": 7, "connectionerror": 7, "tri": 7, "construct": 7, "servic": 7, "vdatum_url": 7, "invalid": 7, "egm": 7, "egmi": 7, "3855": 7, "bad_nam": 7, "navd": 7, "88": 7, "A": 7, "verifi": 7}, "objects": {"pyegt": [[1, 0, 0, "-", "defs"], [2, 0, 0, "-", "height"], [6, 0, 0, "-", "test"], [7, 0, 0, "-", "utils"]], "pyegt.defs": [[1, 1, 1, "", "MODEL_LIST"], [1, 1, 1, "", "NGS_MODELS"], [1, 1, 1, "", "REGIONS"], [1, 1, 1, "", "VDATUM_MODELS"]], "pyegt.height": [[2, 2, 1, "", "HeightModel"]], "pyegt.height.HeightModel": [[2, 3, 1, "", "__eq__"], [2, 3, 1, "", "__float__"], [2, 3, 1, "", "__repr__"], [2, 3, 1, "", "__str__"], [2, 3, 1, "", "as_dict"], [2, 3, 1, "", "as_float"], [2, 3, 1, "", "as_string"], [2, 3, 1, "", "available_models"], [2, 3, 1, "", "available_regions"], [2, 3, 1, "", "from_epsg"], [2, 3, 1, "", "from_model"], [2, 3, 1, "", "from_vrs"], [2, 3, 1, "", "from_wkt"], [2, 3, 1, "", "get_height"], [2, 3, 1, "", "in_cm"], [2, 3, 1, "", "in_feet"], [2, 3, 1, "", "in_feet_us_survey"], [2, 3, 1, "", "verify_model"]], "pyegt.test": [[6, 4, 1, "", "test"]], "pyegt.utils": [[7, 4, 1, "", "get_ngs_json"], [7, 4, 1, "", "get_ngs_url"], [7, 4, 1, "", "get_vdatum_json"], [7, 4, 1, "", "get_vdatum_url"], [7, 4, 1, "", "model_search"]]}, "objtypes": {"0": "py:module", "1": "py:data", "2": "py:class", "3": "py:method", "4": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "data", "Python data"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"], "4": ["py", "function", "Python function"]}, "titleterms": {"about": 0, "pyegt": [0, 1, 2, 3, 5, 6, 7], "def": 1, "height": 2, "0": 3, "1": 3, "2": 3, "resourc": 3, "librari": 3, "lookup": 3, "instal": 4, "pip": 4, "conda": 4, "from": 4, "sourc": 4, "us": 5, "test": 6, "util": 7}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.todo": 2, "sphinx": 57}, "alltitles": {"About pyegt": [[0, "about-pyegt"]], "pyegt.defs": [[1, "module-pyegt.defs"]], "pyegt.height": [[2, "module-pyegt.height"]], "pyegt 0.1.2": [[3, "pyegt-version"]], "Resources": [[3, null]], "Library": [[3, null]], "Lookups": [[3, "lookups"]], "Installation": [[4, "installation"]], "pip": [[4, "pip"]], "conda": [[4, "conda"]], "From source": [[4, "from-source"]], "Using pyegt": [[5, "using-pyegt"]], "pyegt.test": [[6, "module-pyegt.test"]], "pyegt.utils": [[7, "module-pyegt.utils"]]}, "indexentries": {"model_list (in module pyegt.defs)": [[1, "pyegt.defs.MODEL_LIST"]], "ngs_models (in module pyegt.defs)": [[1, "pyegt.defs.NGS_MODELS"]], "regions (in module pyegt.defs)": [[1, "pyegt.defs.REGIONS"]], "vdatum_models (in module pyegt.defs)": [[1, "pyegt.defs.VDATUM_MODELS"]], "module": [[1, "module-pyegt.defs"], [2, "module-pyegt.height"], [6, "module-pyegt.test"], [7, "module-pyegt.utils"]], "pyegt.defs": [[1, "module-pyegt.defs"]], "heightmodel (class in pyegt.height)": [[2, "pyegt.height.HeightModel"]], "__eq__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__eq__"]], "__float__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__float__"]], "__repr__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__repr__"]], "__str__() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.__str__"]], "as_dict() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.as_dict"]], "as_float() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.as_float"]], "as_string() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.as_string"]], "available_models() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.available_models"]], "available_regions() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.available_regions"]], "from_epsg() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_epsg"]], "from_model() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_model"]], "from_vrs() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_vrs"]], "from_wkt() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.from_wkt"]], "get_height() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.get_height"]], "in_cm() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.in_cm"]], "in_feet() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.in_feet"]], "in_feet_us_survey() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.in_feet_us_survey"]], "pyegt.height": [[2, "module-pyegt.height"]], "verify_model() (pyegt.height.heightmodel method)": [[2, "pyegt.height.HeightModel.verify_model"]], "pyegt.test": [[6, "module-pyegt.test"]], "test() (in module pyegt.test)": [[6, "pyegt.test.test"]], "get_ngs_json() (in module pyegt.utils)": [[7, "pyegt.utils.get_ngs_json"]], "get_ngs_url() (in module pyegt.utils)": [[7, "pyegt.utils.get_ngs_url"]], "get_vdatum_json() (in module pyegt.utils)": [[7, "pyegt.utils.get_vdatum_json"]], "get_vdatum_url() (in module pyegt.utils)": [[7, "pyegt.utils.get_vdatum_url"]], "model_search() (in module pyegt.utils)": [[7, "pyegt.utils.model_search"]], "pyegt.utils": [[7, "module-pyegt.utils"]]}}) \ No newline at end of file diff --git a/docsrc/_build/html/utils.html b/docsrc/_build/html/utils.html index 2ffc0f3..dcb6019 100644 --- a/docsrc/_build/html/utils.html +++ b/docsrc/_build/html/utils.html @@ -95,11 +95,11 @@

pyegt.utils

-pyegt.utils.get_ngs_json(ngs_url: str) dict
+pyegt.utils.get_ngs_json(ngs_url: str) dict

Use a given NGS API URL to get a response, and return the response if valid.

Parameters:
-

ngs_url (str) – The NGS query URL

+

ngs_url (str) – The NGS query URL

Returns:

The returned json (if applicable)

@@ -109,8 +109,8 @@
Raises:
@@ -118,47 +118,47 @@
-pyegt.utils.get_ngs_url(lat: float, lon: float, ngs_model: int) str
+pyegt.utils.get_ngs_url(lat: float, lon: float, ngs_model: int) str

Construct the API URL that will be used to query the NGS service.

Parameters:
    -
  • lat (float) – Decimal latitude

  • -
  • lon (float) – Decimal longitude

  • -
  • ngs_model (str) – The NGS geoid model to use for lookup (see list)

  • +
  • lat (float) – Decimal latitude

  • +
  • lon (float) – Decimal longitude

  • +
  • ngs_model (str) – The NGS geoid model to use for lookup (see list)

Returns:

The query url to use in lookup

Return type:
-

str

+

str

-pyegt.utils.get_vdatum_json(vdatum_url, region) dict
+pyegt.utils.get_vdatum_json(vdatum_url, region) dict

Use a given VDatum API URL to get a response, and return the response if valid.

Parameters:
    -
  • vdatum_url (str) – The VDatum query URL

  • -
  • region (str) – The region to search

  • +
  • vdatum_url (str) – The VDatum query URL

  • +
  • region (str) – The region to search

Returns:

JSON response from VDatum API

Return type:
-

dict

+

dict

Raises:
    -
  • AttributeError – if the returned JSON has an error indicating the set region is invalid

  • -
  • AttributeError – if the returned JSON has a generic error code

  • -
  • ConnectionError – if no VDatum JSON is returned in 3 tries

  • +
  • AttributeError – if the returned JSON has an error indicating the set region is invalid

  • +
  • AttributeError – if the returned JSON has a generic error code

  • +
  • ConnectionError – if no VDatum JSON is returned in 3 tries

@@ -166,34 +166,37 @@
-pyegt.utils.get_vdatum_url(lat: float, lon: float, vdatum_model: str, region: str) str
+pyegt.utils.get_vdatum_url(lat: float, lon: float, vdatum_model: str, region: str) str

Construct the API URL that will be used to query the VDatum service.

Parameters:
    -
  • lat (float) – Decimal latitude

  • -
  • lon (float) – Decimal longitude

  • -
  • vdatum_model (str) – The VDatum geoid, tidal, or geopotential model to use for lookup (see list at pyegt.defs.MODEL_LIST)

  • -
  • region (str) – The region to search

  • +
  • lat (float) – Decimal latitude

  • +
  • lon (float) – Decimal longitude

  • +
  • vdatum_model (str) – The VDatum geoid, tidal, or geopotential model to use for lookup (see list at pyegt.defs.MODEL_LIST)

  • +
  • region (str) – The region to search

Returns:

The VDatum query URL

Return type:
-

str

+

str

+pyegt.utils.model_search(vrs: str | None = None) str | Literal[None]

Get a model name from a search term containing that name.

Example:

>>> egm = "EGM2008 height"
 >>> model_search(vrs=egm)
 "EGM2008"
+>>> egmi = 3855
+>>> model_search(vrs=egmi)
+"EGM2008"
 >>> navd88 = "NAVD88 (US Survey Feet)"
 >>> model_search(vrs=navd88)
 "NAVD88"
@@ -204,13 +207,13 @@
 
Parameters:
-

vrs (str) – The search term containing the model name

+

vrs (str) – The search term containing the model name

Returns:

A verified model name or None if none is found

Return type:
-

str or None

+

str or None

diff --git a/pyegt/utils.py b/pyegt/utils.py index 31af6f8..5d7832f 100644 --- a/pyegt/utils.py +++ b/pyegt/utils.py @@ -14,6 +14,9 @@ def model_search(vrs: str=None) -> Union[str, Literal[None]]: >>> egm = "EGM2008 height" >>> model_search(vrs=egm) "EGM2008" + >>> egmi = 3855 + >>> model_search(vrs=egmi) + "EGM2008" >>> navd88 = "NAVD88 (US Survey Feet)" >>> model_search(vrs=navd88) "NAVD88"