Opened 7 years ago
Closed 3 years ago
#2464 closed enhancement (fixed)
st_curvetoline maxError instead of segments/quarter paramter
Reported by: | mjurce | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.4.0 |
Component: | postgis | Version: | master |
Keywords: | curves | Cc: |
Description
Let the function compute the number of segments per quarter respect to the error approximation given from the user. The number of segments should dpend on the circle curvature. The fixed parmeter "segm/quarter circle" is not always good with big and flat arcs.
The error parameter could be the max distance between the segment and the arc.
Change History (9)
comment:1 Changed 7 years ago by
Milestone: | → PostGIS 2.2.0 |
---|---|
Priority: | medium → low |
Type: | defect → enhancement |
Version: | 2.0.x → trunk |
comment:2 Changed 6 years ago by
Keywords: | curves added |
---|
comment:3 Changed 6 years ago by
The maxError " maxDist(chord,arc) with n points segmentation could be computed: maxError=r*(1-cos( theta/(2*(n+1)) ) )
Solving for "maxError" should give:
nPoints = theta/(2*acos(1- maxError/r))
Someone could check if this is correct? Then is easy to plug-in into arc segmentizer. The angle increment will be given from this formula.
comment:4 Changed 5 years ago by
Owner: | changed from pramsey to strk |
---|
comment:5 Changed 5 years ago by
Milestone: | PostGIS 2.2.0 → PostGIS Future |
---|
comment:6 Changed 3 years ago by
For the record, this is implemented in QGIS: https://qgis.org/api/classQgsCircularString.html#ab11654b8e0e12ad86f98a0d5dd70adee
comment:7 Changed 3 years ago by
Milestone: | PostGIS Future → PostGIS 2.4.0 |
---|---|
Priority: | low → medium |
Status: | new → assigned |
comment:8 Changed 3 years ago by
Work started in https://gitlab.com/postgis/postgis/merge_requests/3
Implementing this would allow to support conversion of 3-points lines to curves #2627