[PostGIS] #5725: Undocumented st_offsetcurve behaviour change between 3.2 and 3.3
PostGIS
trac at osgeo.org
Tue Apr 30 15:57:34 PDT 2024
#5725: Undocumented st_offsetcurve behaviour change between 3.2 and 3.3
-------------------------------------------------+-------------------------
Reporter: gbartonowenstl | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS
| 3.3.7
Component: postgis | Version: 3.3.x
Keywords: offsetcurve, release notes, |
st_offsetcurve, reversing |
-------------------------------------------------+-------------------------
I've read all the release notes and searched the internet generally for
this but I cannot find anything.
It appears that between 3.2 and 3.3, st_offsetcurve started reversing the
curves when a negative offset was given (the documented behaviour), where
as previously it did not.
Reproduction SQL:
{{{
select
PostGIS_Version(),
st_startpoint(geom),
st_startpoint(st_offsetcurve(geom, -0.1)),
st_distance(st_startpoint(geom), st_startpoint(st_offsetcurve(geom,
-0.1)))
from
(values (st_geomfromtext('LINESTRING (2302997.443737494 116854.4859950367,
2303083.234236186 117132.01622010056)',2163))) as vals (geom)
}}}
One env:
3.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1 POINT (2302997.443737494
116854.4859950367) POINT (2303083.3297756314 117131.98668682482)
290.48759954576633
Older env:
3.2 USE_GEOS=1 USE_PROJ=1 USE_STATS=1 POINT (2302997.443737494
116854.4859950367) POINT (2302997.5392769394 116854.45646176096)
0.10000000013339401
I think this is due to a geos change: https://github.com/dr-
jts/geos/commit/7561b50f943305b1419bd655e10e7dcad2cb9492
I'd say this was mostly a bug in the documentation/release notes but I
suspect it will cause subtle sadness for many
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5725>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list