<div dir="ltr">It returns true so that the functions are internally consistent, i.e. whenever ST_OrderingEquals(geom, ST_ForcePolygonCCW(geom)) is true then ST_IsPolygonCCW(geom) must also be true.  One way to think of it is that the function is telling you whether all of the polygons in the input are oriented CCW.  If you have zero polygons, then all of the polygons are oriented CCW.  In addition to internal consistency, this allows the functions to work on geometry collections that contain mixed geometry types (say, a polygon and a point).<div><br></div><div>One application of the function is to test whether an arbitrary geometry will behave correctly in software that requires a particular orientation, without having to separately test the type of the geometry.<br><div><br></div><div>Do you want to explain a bit about why you don't like it?  Is there a use case that benefits from the NULL return?</div><div><br></div><div>Dan</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 17, 2017 at 3:19 AM, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@kbt.io" target="_blank">strk@kbt.io</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Mar 16, 2017 at 05:28:07PM -0700, Daniel Baston wrote:<br>
> Author: dbaston<br>
> Date: 2017-03-16 17:28:07 -0700 (Thu, 16 Mar 2017)<br>
> New Revision: 15336<br>
<br>
</span>> +                                             <function>ST_IsPolygonCCW</<wbr>function><br>
...<br>
<span class="">> +                             Returns true for all non-polygonal geometries.<br>
<br>
</span>I don't like this approach. Why true ? I'd rather see a NULL return<br>
there, if you don't want to be hit by an exception.<br>
<br>
What do others think about this ?<br>
<br>
--strk;<br>
______________________________<wbr>_________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/postgis-devel</a></blockquote></div><br></div>