We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a292158 commit 85ccb7aCopy full SHA for 85ccb7a
pypsdm/db/weather/models.py
@@ -2,7 +2,7 @@
2
from typing import Any, ClassVar, Dict
3
4
from shapely import Point
5
-from shapely.wkb import dumps, loads
+from shapely.wkb import loads
6
from sqlalchemy import Column, LargeBinary
7
from sqlmodel import Field, SQLModel
8
@@ -101,6 +101,5 @@ def x(self) -> float:
101
102
@staticmethod
103
def from_xy(id: int, x: float, y: float) -> "Coordinate":
104
- point = Point(x, y)
105
- wkb_data = dumps(point)
106
- return Coordinate(id=id, coordinate=wkb_data)
+ wkb = Point(x, y).wkb
+ return Coordinate(id=id, coordinate=wkb)
0 commit comments