Opened 4 weeks ago
Last modified 4 weeks ago
#5738 new defect
ST_OffsetCurve returns wrong geometry
Reported by: | rkolka | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS GEOS |
Component: | postgis | Version: | 3.4.x |
Keywords: | st_offsetcurve | Cc: |
Description
ST_OffsetCurve sometimes returns wrong geometry. Seems to happen when source geometry has 2 vertices very close.
CREATE TABLE public.offsetcurve_bug ( id serial primary key, description text, geometry geometry(LineString) ) ; CREATE INDEX offsetcurve_bug_geometry_x ON public.offsetcurve_bug USING gist (geometry); INSERT INTO public.offsetcurve_bug( description, geometry) VALUES ('original', 'LINESTRING(544237.894288877 6588306.70972559,544226.9710250939 6588308.03375757,544220.8010926669 6588309.418844438)'::geometry(LineString)) , ('original', 'LINESTRING(544172.354706179 6588303.23414166,544174.671762133 6588304.55817364,544178.8093620511 6588306.2132136)'::geometry(LineString)) ; INSERT INTO public.offsetcurve_bug (description, geometry) SELECT 'substring' as description, ST_LineSubstring(geometry, 0.35, 0.65) as geometry FROM public.offsetcurve_bug WHERE description = 'original' ; INSERT INTO public.offsetcurve_bug (description, geometry) SELECT 'offset 6m' as description, ST_OffsetCurve(geometry, -6, 'quad_segs=4 join=mitre mitre_limit=1.1') as geometry FROM public.offsetcurve_bug WHERE description = 'substring' ;
POSTGIS=3.4.2 GEOS=3.11.1-CAPI-1.17.1
Attachments (1)
Change History (4)
by , 4 weeks ago
Attachment: | ST_OffsetCurve_bug.png added |
---|
comment:2 by , 4 weeks ago
In GEOS 3.11.3 this doesn't seem to have any issues (assuming I have the test case right).
comment:3 by , 4 weeks ago
Milestone: | → PostGIS GEOS |
---|
Note:
See TracTickets
for help on using tickets.
The example provided is quite complex. Can you provide a single example showing the questionable behaviour?
Something like this: