From 4798c019c6645badb1a8bb4414dfb6835ac1c253 Mon Sep 17 00:00:00 2001 From: barneydobson Date: Thu, 25 Jan 2024 10:00:00 +0000 Subject: [PATCH] Update swmmanywhere/geospatial_operations.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Diego Alonso Álvarez <6095790+dalonsoa@users.noreply.github.com> --- swmmanywhere/geospatial_operations.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/swmmanywhere/geospatial_operations.py b/swmmanywhere/geospatial_operations.py index ec8c1dc9..4e588b7b 100644 --- a/swmmanywhere/geospatial_operations.py +++ b/swmmanywhere/geospatial_operations.py @@ -70,25 +70,6 @@ def get_utm_crs(x: float, ) return f"{utm_crs_list[0].auth_name}:{utm_crs_list[0].code}" -def get_utm_epsg(lon: float, lat: float) -> str: - """Get the formatted UTM EPSG code for a given longitude and latitude. - - Args: - lon (float): Longitude in EPSG:4326 (x) - lat (float): Latitude in EPSG:4326 (y) - - Returns: - str: Formatted EPSG code for the UTM zone. - - Example: - >>> get_utm_epsg(-0.1276, 51.5074) - 'EPSG:32630' - """ - # Determine the UTM zone number - zone_number = int((lon + 180) / 6) + 1 - # Determine the UTM EPSG code based on the hemisphere - utm_epsg = 32600 + zone_number if lat >= 0 else 32700 + zone_number - return 'EPSG:{0}'.format(utm_epsg) def interp_wrap(xy: tuple[float,float], interp: RegularGridInterpolator,