Opened 6 years ago

Closed 4 months ago

#4072 closed defect (fixed)

ST_OffsetCurve fails on very specific inputs

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

Description

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 (7)

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

comment:6 by mdavis, 4 months ago

Now fixed in more recent GEOS versions.

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');
                                                                                       st_offsetcurve                                                                                       
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 0102000020E864000005000000D879DF08561B164138544986928D5541C6DC969A4A1B1641B0BEBC7B948D55411CEE2381361B164196450809948D55419A1E9E0F421B1641535D0A11928D55419DDFFC144A1B164136B51C40928D5541
Last edited 4 months ago by mdavis (previous) (diff)

comment:7 by mdavis, 4 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.