<div dir="ltr">Sorry, I'm not sure I understand which direction you're asking me to pursue.  Are you asking that I write some new functions ST_IsCW and ST_IsCCW that apply _only_ to LineStrings, and then rename the four functions proposed in the PR to something else?<div><br></div><div>Dan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 8, 2017 at 9:22 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 Wed, Feb 08, 2017 at 08:29:56AM -0500, Daniel Baston wrote:<br>
> OK, so some alternatives I see are:<br>
><br>
> 1) rename the functions to more clearly indicate that they only consider<br>
> polygons (ST_ForcePolygonCW, ST_IsPolygonCW ? )<br>
<br>
</span>The fact that Clockwise state is different in shell and holes makes<br>
"right hand rule" less ambiguous to me. As the ambiguity is in the<br>
"rule" term, we could find a name making it clearer that you want<br>
to find the polygon interior on the right while walking on its<br>
edges. ST_ForceAreaRight / ST_ForceAreaLeft ?<br>
<span class=""><br>
> 2) modify new functions and ST_ForceRHR to also consider orientation of<br>
> closed LineStrings<br>
<br>
</span>The "right hand rule" is specifically about polygons, so I don't<br>
see a problem there to leave LineStrings untouched.<br>
<span class=""><br>
> 3) modify new functions to also consider closed LineStrings, without<br>
> modifying ST_ForceRHR<br>
><br>
> I don't like the idea of modifying ST_ForceRHR, since it has existed<br>
> forever, and modifying this would also suggest changes to ST_ForceLHR,<br>
> whose implementation is contained within SFCGAL.<br>
<br>
</span>What does ST_ForceLHR do ? Documentation doesn't say.<br>
Is it the reverse of ST_ForceRHR or does it use the other<br>
semantic ?<br>
<span class=""><br>
> I'm inclined towards #1.  Do people have any thoughts on these<br>
> alternatives, or maybe a different solution?<br>
<br>
</span>At least for topology, it would be useful to have an ST_IsCW or<br>
ST_IsCCW function accepting a closed linestring in input<br>
(sounds like #3)<br>
<div class="HOEnZb"><div class="h5"><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></div></div></blockquote></div><br></div>