Skip to content

Commit 91600a9

Browse files
committed
Remove deprecated infer_unit_coords function
1 parent 8edb184 commit 91600a9

1 file changed

Lines changed: 0 additions & 33 deletions

File tree

climada/util/coordinates.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -113,39 +113,6 @@ def check_if_geo_coords(lat, lon):
113113
return bool(test)
114114

115115

116-
def infer_unit_coords(coords):
117-
"""
118-
Infer the unit of measurement for the given coordinate system.
119-
120-
Parameters
121-
----------
122-
coords : GeoDataFrame or similar object
123-
An object with a coordinate reference system (CRS) attribute.
124-
125-
Returns
126-
-------
127-
unit : str
128-
The unit of measurement for the coordinate system, either 'degree' for
129-
geodetic systems or 'm' for projected systems.
130-
131-
Raises
132-
------
133-
ValueError
134-
If the coordinate system is neither geodetic nor projected, or if the
135-
unit cannot be inferred.
136-
"""
137-
138-
if coords.crs.is_geographic:
139-
unit = "degree"
140-
elif coords.crs.is_projected:
141-
unit = "m"
142-
else:
143-
raise ValueError(
144-
"Unable to infer unit for coordinate points. Please specify unit of the coordinates."
145-
)
146-
return unit
147-
148-
149116
def get_crs_unit(coords):
150117
"""
151118
Retrieve the unit of measurement for the coordinate reference system (CRS).

0 commit comments

Comments
 (0)