Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Alan D. Snow <[email protected]>
  • Loading branch information
Kirill888 and snowman2 committed Jan 19, 2024
1 parent eef18db commit cc563c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rioxarray/rioxarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -1248,9 +1248,9 @@ def get_gcps(self) -> Optional[list[GroundControlPoint]]:
except (KeyError, AttributeError):
return None

def parse_gcp(gcp) -> GroundControlPoint:
def _parse_gcp(gcp) -> GroundControlPoint:
x, y, *z = gcp["geometry"]["coordinates"]
z = z[0] if len(z) > 0 else None
z = z[0] if z else None
return GroundControlPoint(
x=x,
y=y,
Expand All @@ -1261,7 +1261,7 @@ def parse_gcp(gcp) -> GroundControlPoint:
info=gcp["properties"]["info"],
)

gcps = [parse_gcp(gcp) for gcp in geojson_gcps["features"]]
gcps = [_parse_gcp(gcp) for gcp in geojson_gcps["features"]]
return gcps


Expand All @@ -1280,7 +1280,7 @@ def _convert_gcps_to_geojson(
A FeatureCollection dict.
"""

def gcp_coordinates(gcp):
def _gcp_coordinates(gcp):
if gcp.z is None:
return [gcp.x, gcp.y]
return [gcp.x, gcp.y, gcp.z]
Expand Down

0 comments on commit cc563c4

Please sign in to comment.