Opened 16 months ago

Closed 16 months ago

Last modified 16 months ago

#3607 closed defect (fixed)

ST_LocateBetweenElevations failing on typed collections

Reported by: komzpa Owned by: pramsey
Priority: high Milestone: PostGIS 2.3.0
Component: postgis Version: 2.1.x
Keywords: Cc:

Description

I observe the following inconsistency:

[local] gis@gis=# select ST_AsText(ST_LocateBetweenElevations('MULTILINESTRING Z((0 0 0, 10 10 10))'::geometry, 11, 11));
ERROR:  XX000: lwgeom_clip_to_ordinate_range clipping routine returned NULL
LOCATION:  pg_error, lwgeom_pg.c:164
Time: 0,408 ms
[local] gis@gis=# select ST_AsText(ST_LocateBetweenElevations('LINESTRING Z(0 0 0, 10 10 10)'::geometry, 11, 11));
┌─────────────────────────┐
│        st_astext        │
├─────────────────────────┤
│ MULTILINESTRING Z EMPTY │
└─────────────────────────┘
(1 row)

Time: 0,393 ms

Change History (6)

comment:1 Changed 16 months ago by zarthur

Hello,

I send pull request https://github.com/postgis/postgis/pull/112. After this fix the query give the following result:

=> SELECT ST_AsText(ST_LocateBetweenElevations('MULTILINESTRING Z((0 0 0, 10 10 10))'::geometry, 11, 11));
        st_astext        
-------------------------
 MULTILINESTRING Z EMPTY
(1 row)

I suppose ST_LocateBetweenElevations() becomes consistent after it. After viewing code I don't see any drawbacks.

comment:2 Changed 16 months ago by strk

Priority: mediumhigh

Could you please also add a testcase in regress_lrs{.sql,expected} ? You can reference this ticket by number in the test description (first value returned by query) see examples in tickets.sql

comment:3 Changed 16 months ago by strk

Resolution: fixed
Status: newclosed

In 15036:

Fix inconsistency with multilinestring in ST_LocateBetweenElevations()

Fixes #3607.
Includes testcase.

Patch by Artur Zakirov <a.zakirov@…>

comment:4 Changed 16 months ago by zarthur

Ofcourse. I fixed tests.

comment:5 Changed 16 months ago by strk

In 15037:

Fix inconsistency with multilinestring in ST_LocateBetweenElevations()

Closes #3607
Includes testcase

Patch by Artur Zakirov <a.zakirov@…>

comment:6 Changed 16 months ago by strk

Version: 2.2.x2.1.x

For the record: commit for trunk is r15035 r15036 is for 2.2 branch and r15035 for 2.1 branch

Note: See TracTickets for help on using tickets.