Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#3982 closed defect (fixed)

ST_AsEncodedPolyline('SRID=4326;LINESTRING EMPTY') fails

Reported by: komzpa Owned by: pramsey
Priority: medium Milestone: PostGIS 2.4.3
Component: postgis Version: 2.4.x
Keywords: Cc:

Description

ST_AsEncodedPolyline('SRID=4326;LINESTRING EMPTY') fails:

[local] gis@gis=# select ST_AsEncodedPolyline('SRID=4326;LINESTRING EMPTY');
ERROR:  XX000: getPoint2d_cp: point offset out of range
LOCATION:  pg_error, lwgeom_pg.c:162
Time: 0,263 ms

It should be empty string. Reverse works:

[local] gis@gis=# select ST_AsText(ST_LineFromEncodedPolyline(''));
┌──────────────────┐
│    st_astext     │
├──────────────────┤
│ LINESTRING EMPTY │
└──────────────────┘
(1 row)

Time: 2,080 ms

Change History (6)

comment:1 by komzpa, 7 years ago

In 16254:

Formatting only before toucing Encoded Polyline logic.

References #3982

comment:3 by komzpa, 7 years ago

Resolution: fixed
Status: newclosed

In 16263:

Encoded Polyline of EMPTY

Closes #3982
Closes https://github.com/postgis/postgis/pull/189

comment:4 by komzpa, 7 years ago

In 16264:

Encoded Polyline of EMPTY
Pull in from trunk

Closes #3982

comment:5 by komzpa, 7 years ago

In 16265:

Encoded Polyline of EMPTY
Pull in from trunk

Closes #3982

comment:6 by komzpa, 7 years ago

In 16266:

Encoded Polyline of EMPTY
Pull in from trunk

Closes #3982

Note: See TracTickets for help on using tickets.