Skip to content

Commit 8f9251b

Browse files
committed
Resolve mypy confusion due to type reassignment
1 parent 142f000 commit 8f9251b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/bedrock_ge/gi/geospatial.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ def location_gis_geometry(brgi_db: BedrockGIDatabase) -> gpd.GeoDataFrame:
1212
# 1. Create WKT geometry for each location in original CRS
1313
# 2. Convert to WGS84 + EGM2008 orthometric height EPSG:9518
1414
# 3. Interpolate InSituTest and Sample geospatial vector geometry from active geometry column
15-
hor_crs = brgi_db.Project["horizontal_crs_wkt"]
16-
vert_crs = brgi_db.Project["vertical_crs_wkt"]
17-
if hor_crs.nunique() > 1 or vert_crs.nunique() > 1:
15+
hor_crs_series = brgi_db.Project["horizontal_crs_wkt"]
16+
vert_crs_series = brgi_db.Project["vertical_crs_wkt"]
17+
if hor_crs_series.nunique() > 1 or vert_crs_series.nunique() > 1:
1818
raise ValueError(
1919
"All projects must have the same horizontal and vertical CRS (Coordinate Reference System).\n"
2020
"Raise an issue on GitHub in case you need to be able to combine GI data that was acquired in multiple different CRSes."
2121
)
2222

23-
hor_crs = CRS.from_wkt(hor_crs.iat[0])
24-
vert_crs = CRS.from_wkt(vert_crs.iat[0])
23+
horizontal_crs = CRS.from_wkt(hor_crs_series.iat[0])
24+
vertical_crs = CRS.from_wkt(vert_crs_series.iat[0])
2525
compound_crs = CompoundCRS(
26-
name=f"{hor_crs.name} + {vert_crs.name}",
27-
components=[hor_crs, vert_crs],
26+
name=f"{horizontal_crs.name} + {vertical_crs.name}",
27+
components=[horizontal_crs, vertical_crs],
2828
)
2929

3030
# TODO: Implement logic such that inclined borholes are handled correctly.

0 commit comments

Comments
 (0)