@@ -28,14 +28,15 @@ def calculate_gis_geometry(
2828
2929 Returns:
3030 Dict[str, gpd.GeoDataFrame]: Dictionary containing the Bedrock GI database tables
31- with added GIS geometry. All tables are converted to GeoDataFrames with
32- appropriate CRS and geometry columns.
31+ with added GIS geometry. All tables are converted to GeoDataFrames with
32+ appropriate CRS and geometry columns.
3333
3434 Raises:
3535 ValueError: If the projects in the database use different Coordinate Reference Systems (CRS).
3636
3737 Note:
3838 The function performs the following operations:
39+
3940 1. Verifies all projects use the same CRS
4041 2. Calculates GIS geometry for the 'Location' table
4142 3. Creates a 'LonLatHeight' table for 2D visualization
@@ -155,7 +156,7 @@ def calculate_location_gis_geometry(
155156
156157def calculate_wgs84_coordinates (
157158 from_crs : CRS , easting : float , northing : float , elevation : Union [float , None ] = None
158- ) -> Tuple :
159+ ) -> Tuple [ float , float , ( float | None )] :
159160 """Transforms coordinates from an arbitrary Coordinate Reference System (CRS) to the WGS84 CRS, which is the standard for geodetic coordinates.
160161
161162 Args:
@@ -166,9 +167,10 @@ def calculate_wgs84_coordinates(
166167 transform. Defaults to None.
167168
168169 Returns:
169- tuple: A tuple containing the longitude, latitude and WGS84 height of the
170- transformed point, in that order. The height is None if no elevation was
171- given, or if the provided CRS doesn't have a proper datum defined.
170+ Tuple[float, float, (float | None)]: A tuple containing the longitude, latitude
171+ and WGS84 height of the transformed point, in that order.
172+ The height is None if no elevation was given, or if the provided CRS doesn't
173+ have a proper datum defined.
172174 """
173175 transformer = Transformer .from_crs (from_crs , 4326 , always_xy = True )
174176 if elevation :
@@ -177,7 +179,7 @@ def calculate_wgs84_coordinates(
177179 lon , lat = transformer .transform (easting , northing )
178180 wgs84_height = None
179181
180- return lon , lat , wgs84_height
182+ return ( lon , lat , wgs84_height )
181183
182184
183185def create_lon_lat_height_table (
@@ -197,7 +199,7 @@ def create_lon_lat_height_table(
197199 crs (CRS): The Coordinate Reference System of the GI locations.
198200
199201 Returns:
200- GeoDataFrame: The 'LonLatHeight' GeoDataFrame.
202+ gpd. GeoDataFrame: The 'LonLatHeight' GeoDataFrame.
201203 """
202204 lon_lat_height = gpd .GeoDataFrame (
203205 brgi_location [
@@ -231,9 +233,9 @@ def calculate_in_situ_gis_geometry(
231233
232234 Returns:
233235 gpd.GeoDataFrame: The GIS geometry for the given in-situ data, with additional columns:
234- - elevation_at_top: The elevation at the top of the in-situ data.
235- - elevation_at_base: The elevation at the base of the in-situ data.
236- - geometry: The GIS geometry of the in-situ data.
236+ - elevation_at_top: The elevation at the top of the in-situ data.
237+ - elevation_at_base: The elevation at the base of the in-situ data.
238+ - geometry: The GIS geometry of the in-situ data.
237239 """
238240 location_child = brgi_in_situ .copy ()
239241
0 commit comments