From 5970eb63b2404424ee346e011fd5987aaaed6a0e Mon Sep 17 00:00:00 2001 From: Ian Nesbitt Date: Thu, 2 Nov 2023 07:24:18 -0700 Subject: [PATCH] adding handling of integer epsg --- pyegt/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyegt/utils.py b/pyegt/utils.py index aa6bdd7..31af6f8 100644 --- a/pyegt/utils.py +++ b/pyegt/utils.py @@ -1,6 +1,7 @@ import time import requests from typing import Union, Literal +from pyproj import CRS from . import defs @@ -25,6 +26,7 @@ def model_search(vrs: str=None) -> Union[str, Literal[None]]: :rtype: str or None """ for m in defs.MODEL_LIST: + vrs = CRS.from_epsg(vrs) if isinstance(vrs, int) else vrs if m in vrs: # sometimes vrs from WKT will be formatted like "EGM2008 height" and this should catch that return m