-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
A TGeomPointInst created with from_base_time truncates the microseconds of the timestamps. As a consequence, when creating a TGeomPointSeq, some timestamps may become equal and make MEOS throw an error.
Example
via string :
traj_test1 = pymeos.TGeomPointSeq(
"SRID=3857;[POINT(0 0)@2019-01-01T08:00:00+00, POINT(1 1)@2019-01-01T08:00:00.500000+00]"
)
no error
via instant_list :
t1 = datetime.datetime(2019, 1, 1, 8, 0, 0)
t2 = datetime.datetime(2019, 1, 1, 8, 0, 0, 500000)
inst1 = pymeos.TGeomPointInst.from_base_time(shapely.geometry.Point(0, 0), t1)
inst2 = pymeos.TGeomPointInst.from_base_time(shapely.geometry.Point(1, 1), t2)
traj_test2 = pymeos.TGeomPointSeq(
instant_list=[inst1, inst2], lower_inc=True, upper_inc=True
)
MEOS ERROR:
pymeos_cffi.errors.MeosInvalidArgValueError: MeosInvalidArgValueError (12): Timestamps for temporal value must be increasing: 2019-01-01 08:00:00+00, 2019-01-01 08:00:00+00
Desktop:
- OS: Ubuntu 24.04.1
- Architecture: x86_64
- Environment: Conda
- Version of pymeos : 1.2.0
- Version of shapely : 2.0.6
- Version of python : 3.9.21
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working