Opened 7 years ago
Closed 7 years ago
#3772 closed enhancement (fixed)
ST_CurveToLine balanced output segments
Reported by: | strk | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.4.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
The Current ST_CurveToLine function does not make any effort to balance the resulting segments so that the length of first and last segments are equal. Rather, segments from the start try to be as long as needed to conver a quarter circle by as many segments as segments_per_qtr_circle argument requests.
This ticket is to allow for requesting a symmetric output instead, that is balancing the length of last segment so that it is the same of the first segment.
See also #2464
Attachments (2)
Change History (9)
comment:1 by , 7 years ago
Summary: | ST_CurveToLine symmetric output → ST_CurveToLine balanced output segments |
---|
comment:2 by , 7 years ago
comment:4 by , 7 years ago
I'm reopening because of cases in which symmetricity isn't obtained:
SELECT ST_AsText(ST_CurveToLine( 'CIRCULARSTRING(2680931.973 1225272.341,2680930.723 1225270.971,2680928.869 1225270.923,2680927.625 1225272.101,2680927.57 1225273.814)'::geometry ,0.1,1,1)); LINESTRING(2680931.973 1225272.341,2680931.25863031 1225271.3088611,2680930.11688384 1225270.78727718,2680928.869 1225270.923,2680927.83651479 1225271.7294398,2680927.42757841 1225272.97408509,2680927.57 1225273.814)
comment:5 by , 7 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
by , 7 years ago
Attachment: | curvetoline.png added |
---|
by , 7 years ago
Attachment: | curve2line.png added |
---|
comment:6 by , 7 years ago
Further reduction:
SELECT ST_AsText(ST_CurveToLine( 'CIRCULARSTRING(2680928.869 1225270.923,2680927.625 1225272.101,2680927.57 1225273.814)'::geometry ,0.1,1,1)); LINESTRING(2680928.869 1225270.923,2680927.83651479 1225271.7294398,2680927.42757841 1225272.97408509,2680927.57 1225273.814)
I guess it has to do with the fact that the origin is not shifted appropriately, but rather is always anchored at angle 0.
Work started in https://gitlab.com/postgis/postgis/merge_requests/3