[postgis-devel] ST_CircularString and circle definition

Mateusz Loskot mateusz at loskot.net
Tue Oct 8 05:46:17 PDT 2013


Hi,

According to the latest version of "SQL/MM Part 3: Spatial" which I've
got access too,
section4.1.6 ST_CircularString, the special case of a circle defined as
ST_CircualString is this:

"""
In the special case where a segment is a complete circle, that is, the start
and end points are coincident, then the intermediate point shall be
the midpoint of the segment
"""

So, a circle is represented as a single arc segment of 3 points.

However, AFAIU, PostGIS docs as well examples in PostGIS in Action
book seems to differ
and require two arc segments of 5 points to represent a circle.

SQL Server docs also state [2] the requirement of two semi-circle
segments (5 points):

"""
A CircularString instance cannot use a single circular arc segment
(such as (1 1, 3 1, 1 1)) to define a complete circle. Use (1 1, 2 2,
3 1, 2 0, 1 1) to define the circle.
"""

Could anyone confirm my understanding of the difference between the
implementations
and SQL/MM spec is sound?
If it is, why PostGIS does not follow the SQL/MM spec regarding the circle?

[1] http://jtc1sc32.org/doc/N1101-1150/N1101-1150.html
[2] http://msdn.microsoft.com/en-us/library/ff929141.aspx

Best regards,
-- 
Mateusz  Loskot, http://mateusz.loskot.net



More information about the postgis-devel mailing list