Opened 11 years ago
Closed 8 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 by , 11 years ago
Milestone: | → PostGIS 2.2.0 |
---|---|
Priority: | medium → low |
Type: | defect → enhancement |
Version: | 2.0.x → trunk |
comment:2 by , 11 years ago
Keywords: | curves added |
---|
comment:3 by , 11 years ago
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 by , 10 years ago
Owner: | changed from | to
---|
comment:5 by , 10 years ago
Milestone: | PostGIS 2.2.0 → PostGIS Future |
---|
comment:6 by , 8 years ago
For the record, this is implemented in QGIS: https://qgis.org/api/classQgsCircularString.html#ab11654b8e0e12ad86f98a0d5dd70adee
comment:7 by , 8 years ago
Milestone: | PostGIS Future → PostGIS 2.4.0 |
---|---|
Priority: | low → medium |
Status: | new → assigned |
Implementing this would allow to support conversion of 3-points lines to curves #2627