Opened 7 years ago
Closed 12 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 , 7 years ago
Milestone: | PostGIS GEOS |
---|
comment:2 by , 7 years ago
comment:3 by , 7 years ago
Version: | 2.3.x → trunk |
---|
comment:5 by , 7 years ago
Milestone: | → PostGIS GEOS |
---|
comment:6 by , 12 months ago
Now fixed.
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
comment:7 by , 12 months ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
confirmed on 2.5