From df24a8fa245ec99671809b3d54ae5dab295b1ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Div=C3=AD?= <43449526+Diviloper@users.noreply.github.com> Date: Mon, 12 Aug 2024 19:39:19 +0200 Subject: [PATCH] Sync with MEOS (#68) * Update modified functions * Update tile functions --- pymeos/boxes/stbox.py | 2 +- pymeos/boxes/tbox.py | 4 ++-- pymeos/main/tpoint.py | 4 +--- pymeos/temporal/tinstant.py | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pymeos/boxes/stbox.py b/pymeos/boxes/stbox.py index 488f79c8..1eec7b80 100644 --- a/pymeos/boxes/stbox.py +++ b/pymeos/boxes/stbox.py @@ -1336,7 +1336,7 @@ def tile( else pgis_geometry_in("Point(0 0 0)", -1) ) ) - tiles, count = stbox_tile_list(self._inner, sz, sz, sz, dt, gs, st) + tiles, count = stbox_space_time_tiles(self._inner, sz, sz, sz, dt, gs, st) return [STBox(_inner=tiles + i) for i in range(count)] # ------------------------- Comparisons ----------------------------------- diff --git a/pymeos/boxes/tbox.py b/pymeos/boxes/tbox.py index f8f94446..70579571 100644 --- a/pymeos/boxes/tbox.py +++ b/pymeos/boxes/tbox.py @@ -1131,9 +1131,9 @@ def tile( ) ) if self._is_float(): - tiles, count = tfloatbox_tile_list(self._inner, size, dt, origin, st) + tiles, count = tfloatbox_value_time_tiles(self._inner, size, dt, origin, st) else: - tiles, count = tintbox_tile_list( + tiles, count = tintbox_value_time_tiles( self._inner, int(size), dt, int(origin), st ) return [TBox(_inner=tiles + c) for c in range(count)] diff --git a/pymeos/main/tpoint.py b/pymeos/main/tpoint.py index 04e9c36a..6bc22d9e 100644 --- a/pymeos/main/tpoint.py +++ b/pymeos/main/tpoint.py @@ -331,7 +331,7 @@ def stboxes(self) -> List[STBox]: """ from ..boxes import STBox - result, count = tpoint_stboxes(self._inner, self.num_instants()) + result, count = tpoint_stboxes(self._inner) return [STBox(_inner=result + i) for i in range(count)] def is_simple(self) -> bool: @@ -788,8 +788,6 @@ def is_ever_disjoint(self, other: TPoint) -> bool: MEOS Functions: edisjoint_tpoint_geo, edisjoint_tpoint_tpoint """ - from ..boxes import STBox - if isinstance(other, TPoint): result = edisjoint_tpoint_tpoint(self._inner, other._inner) else: diff --git a/pymeos/temporal/tinstant.py b/pymeos/temporal/tinstant.py index e2701ed6..08f6c207 100644 --- a/pymeos/temporal/tinstant.py +++ b/pymeos/temporal/tinstant.py @@ -2,7 +2,7 @@ from abc import ABC from datetime import datetime -from typing import Optional, Union, Any, TYPE_CHECKING, TypeVar, List +from typing import Optional, Union, TypeVar, List from pymeos_cffi import *