Skip to content

Commit

Permalink
Merge pull request #63 from Diviloper/stable-1.1
Browse files Browse the repository at this point in the history
Backport bugfixes and fix test workflow
  • Loading branch information
Diviloper authored Jul 30, 2024
2 parents a1364f3 + 11204b8 commit beaeb9f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ jobs:
- name: Install pymeos_cffi
run: |
cd PyMEOS-CFFI
python ./pymeos_cffi/builder/build_header.py
python ./pymeos_cffi/builder/build_pymeos_functions.py
python ./builder/build_header.py
python ./builder/build_pymeos_functions.py
pip install .
- name: Test PyMEOS with pytest
Expand Down
21 changes: 15 additions & 6 deletions pymeos/main/tpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -2089,7 +2089,12 @@ def __init__(
p = f'POINT({" ".join(str(x) for x in point)})'
else:
p = f"{point}"
self._inner = tgeompoint_in(f"SRID={srid};{p}@{timestamp}")
full_str = (
f"SRID={srid};{p}@{timestamp}"
if srid is not None
else f"{p}@{timestamp}"
)
self._inner = tgeompoint_in(full_str)


class TGeogPointInst(
Expand All @@ -2116,12 +2121,16 @@ def __init__(
) -> None:
super().__init__(string=string, value=point, timestamp=timestamp, _inner=_inner)
if self._inner is None:
p = (
f"POINT({point[0]} {point[1]})"
if isinstance(point, tuple)
else f"{point}"
if isinstance(point, tuple):
p = f'POINT({" ".join(str(x) for x in point)})'
else:
p = f"{point}"
full_str = (
f"SRID={srid};{p}@{timestamp}"
if srid is not None
else f"{p}@{timestamp}"
)
self._inner = tgeogpoint_in(f"SRID={srid};{p}@{timestamp}")
self._inner = tgeogpoint_in(full_str)


class TGeomPointSeq(
Expand Down

0 comments on commit beaeb9f

Please sign in to comment.