Opened 6 years ago

Last modified 6 years ago

#4072 new defect

ST_OffsetCurve fails on very specific inputs

Reported by: simonseyock Owned by: pramsey
Priority: medium Milestone: PostGIS GEOS
Component: postgis Version: master
Keywords: Cc:


The following command fails:

SELECT ST_OffsetCurve(ST_GeomFromText('LINESTRING(362194.505 5649993.044,362197.451 5649994.125,362194.624 5650001.876,362189.684 5650000.114,362192.542 5649992.324,362194.505 5649993.044)', 25832), -0.045, 'join=mitre');

with the error:

FEHLER: GEOSOffsetCurve: TopologyException: assigned depths do not match at 362194.48950385087 5649993.0862477142 SQL Status:XX000

I am using:

POSTGIS="2.3.2 r15302" GEOS="3.6.1-CAPI-1.10.1 r4317" PROJ="Rel. 4.9.1, 04 March 2015" GDAL="GDAL 2.1.3, released 2017/20/01" LIBXML="2.7.8" LIBJSON="0.12" RASTER

I also tested it with:

POSTGIS="2.3.3 r15473" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.9.1" LIBJSON="0.11.99" RASTER

Note that the first and last coordinates of the linestring are the same. If the first or last coordinate or both are changed the error does not occur. Also if another distance than -0.045 is used the error does not occur.

This error might be somewhat related to #2496, the fix however is not applicable as the bug does appear with newer versiosn of GEOS.

Change History (5)

comment:1 by simonseyock, 6 years ago

Milestone: PostGIS GEOS

comment:2 by komzpa, 6 years ago

confirmed on 2.5

POSTGIS="2.5.0dev r16485" [EXTENSION] PGSQL="100" GEOS="3.7.0dev-CAPI-1.11.0 0" SFCGAL="1.3.1" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.2.1, released 2017/06/23" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.2.1" RASTER

comment:3 by simonseyock, 6 years ago

Version: 2.3.xtrunk

comment:5 by komzpa, 6 years ago

Milestone: PostGIS GEOS
Note: See TracTickets for help on using tickets.