Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2145 closed defect (fixed)

ST_Segmentize(geography, dist) fails with redundant coordinates

Reported by: scw Owned by: pramsey
Priority: medium Milestone: PostGIS 2.1.0
Component: postgis Version: master
Keywords: Cc:

Description

Ubuntu 12.04 x64, PostgreSQL 9.2.2, PostGIS r10800

When I try to segmentize a geography which has redundant coordinates, Postgres hangs entirely:

select St_Segmentize(ST_GeographyFromText('LINESTRING(-89.3000030518 28.2000007629,-89.1999969482 89.1999969482,-89.1999969482 89.1999969482)'), 10000);

If I try the same thing on a geometry, the issue is caught and ST_Segmentize refuses to run:

select St_Segmentize(ST_GeographyFromText('LINESTRING(-89.3000030518 28.2000007629,-89.1999969482 89.1999969482,-89.1999969482 89.1999969482)'::geometry), 10000);
ERROR:  parse error - invalid geometry
HINT:  "010200000003000000990B" <-- parse error at position 22 within geometry

Let me know if I can provide any further details.

SELECT postgis_full_version();

POSTGIS="2.1.0SVN r10800" GEOS="3.3.4-CAPI-1.7.3" PROJ="Rel. 4.8.0, 6 March 2012" LIBXML="2.7.8" LIBJSON="UNKNOWN"

Change History (2)

comment:1 by pramsey, 12 years ago

Resolution: fixed
Status: newclosed

Fixed at r10820, thanks for the report.

comment:2 by scw, 12 years ago

I can confirm this fix works on my messy data. Thanks!

Note: See TracTickets for help on using tickets.