Opened 11 years ago
Last modified 7 years ago
#2627 new enhancement
st_linetocurve() pta_desegmentize needs implementation for npoints < 4
Reported by: | mjurce | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS Fund Me |
Component: | postgis | Version: | 2.0.x |
Keywords: | curves | Cc: |
Description
Still got this kind of errors.
Attachments (1)
Change History (13)
comment:1 by , 11 years ago
Keywords: | curves added |
---|
by , 11 years ago
Attachment: | Perimetri_PUC-PEIP.zip added |
---|
follow-up: 4 comment:3 by , 11 years ago
The only N < 4 that exists for this case is 3. And for 3-point lines the only interpretation is that the points are control points on the curve, so there's no "desegmentization" to be done. Basically this is just a cast, from linestring to circularstring. Or am I mis-interpreting?
comment:4 by , 11 years ago
Replying to pramsey:
The only N < 4 that exists for this case is 3. And for 3-point lines the only interpretation is that the points are control points on the curve, so there's no "desegmentization" to be done. Basically this is just a cast, from linestring to circularstring. Or am I mis-interpreting?
Could be a linestring with 3 points. Depends how the points are on the plane.
comment:5 by , 11 years ago
Considering that the original data to be converted to curved was linear and linear geoms comes from curved. If they had curves before conversion to linear, probably they will be not approximated with only 3 points. Except the cases with flat arcs.
comment:6 by , 11 years ago
Type: | defect → enhancement |
---|
pramsey: yes, I think it would be a cast, but the function should only "cast" if a set of preconditions hold: approximate equidistance from the center, arc length matching the default number of quadrant segments (for 3 points, with default quadrant segments being 8, the arc should cover not more than 3/8 of the quadrant). See also #2428.
Changing to "enhancement".
comment:7 by , 11 years ago
Sorry, I take "approximate equidistance from the center" back, in that any 3 points _define_ the center. So the only left condition is the number of quadrant segments. Can help to avoid taking an L shape for a curve, but I suspect there'd be a lot more lines erroneously taken as curves. Hard problem
follow-up: 9 comment:8 by , 11 years ago
What about http://trac.osgeo.org/postgis/ticket/2464
The error parameter could be the max distance between the segment and the arc: build the arc then check the distance against the linear segment.
Cast to arc if distance low ( to be specified ).
comment:9 by , 11 years ago
Replying to mjurce:
What about http://trac.osgeo.org/postgis/ticket/2464
The error parameter could be the max distance between the segment and the arc: build the arc then check the distance against the linear segment.
Cast to arc if distance low ( to be specified ).
This could be down with sagitta.
comment:10 by , 11 years ago
Milestone: | PostGIS 2.0.5 → PostGIS Future |
---|
I'm sorry, I'm just not seeing this one.
comment:11 by , 11 years ago
The case when a linestring with 3 points could be a curve is when we have a flat arc. This has to be checked.
The other cases remain the same.
Can you attach an example of the case you're trying to solve ?