Skip to content

Commit

Permalink
fixing updating reference
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBaecker committed Oct 2, 2024
1 parent dc9df74 commit bb6fd2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions field_friend/automations/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from field_friend.localization import GeoPoint, GeoPointCollection

from ..localization import reference
from .. import localization


@dataclass(slots=True, kw_only=True)
Expand Down Expand Up @@ -94,7 +94,7 @@ def _generate_rows(self) -> list[Row]:
offset_row_coordinated = offset_curve(ab_line_cartesian, -offset).coords
row_points: list[GeoPoint] = []
for point in offset_row_coordinated:
row_points.append(reference.shifted(Point(x=point[0], y=point[1])))
row_points.append(localization.reference.shifted(Point(x=point[0], y=point[1])))
row = Row(id=str(uuid4()), name=f'{i + 1}', points=row_points)
rows.append(row)
return rows
Expand All @@ -118,7 +118,7 @@ def _generate_outline(self) -> list[GeoPoint]:
bufferd_polygon_coords = bufferd_polygon.exterior.coords
outline: list[GeoPoint] = []
for p in bufferd_polygon_coords:
outline.append(reference.shifted(Point(x=p[0], y=p[1])))
outline.append(localization.reference.shifted(Point(x=p[0], y=p[1])))
return outline

def to_dict(self) -> dict:
Expand Down

0 comments on commit bb6fd2f

Please sign in to comment.