Opened 9 years ago

Closed 7 years ago

#3419 closed defect (invalid)

ST_CurveToLine not behaving as expected on 3 point circle

Reported by: zimmicz Owned by: pramsey
Priority: blocker Milestone: PostGIS 2.4.0
Component: postgis Version: 2.2.x
Keywords: Cc:

Description

Compare results of this query

SELECT ST_GeomFromText('CIRCULARSTRING( -1 0, 0 0, -1 0)'),
(SELECT ST_CurveToLine(ST_GeomFromText('CIRCULARSTRING( -1 0, 0 0, -1 0)'))),
(SELECT ST_GeomFromText('CIRCULARSTRING(0 0, 4 0, 4 4, 0 4, 0 0)')),
(SELECT ST_CurveToLine(ST_GeomFromText('CIRCULARSTRING(0 0, 4 0, 4 4, 0 4, 0 0)')));

The second statement returns a line with half a radius of original circularstring.

Attachments (1)

Screenshot from 2016-01-06 12:10:52.png (29.6 KB ) - added by zimmicz 9 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by robe, 9 years ago

Milestone: PostGIS 2.2.1PostGIS 2.2.2

comment:2 by pramsey, 9 years ago

Milestone: PostGIS 2.2.2PostGIS 2.2.3

comment:3 by dbaston, 8 years ago

Are you using QGIS by chance? It looks to me like QGIS is incorrectly rendering CIRCULARSTRING ( -1 0, 0 0, -1 0 ) . It should look like the ST_CurveToLine result but instead passes through the point (1,0).

Interestingly, Microsoft considers the use of a three-point CIRCULARSTRING to define a circle invalid: https://msdn.microsoft.com/en-us/library/ff929141.aspx

comment:4 by robe, 8 years ago

Milestone: PostGIS 2.2.3PostGIS 2.4.0

comment:5 by dbaston, 7 years ago

Priority: mediumblocker

comment:6 by pramsey, 7 years ago

Resolution: invalid
Status: newclosed

When we look at this in another renderer (JTS test builder), the linearized version is as expected (circle w/ one edge on 0,0 and the other on -1,0)

Note: See TracTickets for help on using tickets.