[postgis-devel] RFC - Orientation checking and forcing functions

Daniel Baston dbaston at gmail.com
Wed Feb 8 08:35:01 PST 2017


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?

Dan

On Wed, Feb 8, 2017 at 9:22 AM, Sandro Santilli <strk at kbt.io> wrote:

> On Wed, Feb 08, 2017 at 08:29:56AM -0500, Daniel Baston wrote:
> > OK, so some alternatives I see are:
> >
> > 1) rename the functions to more clearly indicate that they only consider
> > polygons (ST_ForcePolygonCW, ST_IsPolygonCW ? )
>
> The fact that Clockwise state is different in shell and holes makes
> "right hand rule" less ambiguous to me. As the ambiguity is in the
> "rule" term, we could find a name making it clearer that you want
> to find the polygon interior on the right while walking on its
> edges. ST_ForceAreaRight / ST_ForceAreaLeft ?
>
> > 2) modify new functions and ST_ForceRHR to also consider orientation of
> > closed LineStrings
>
> The "right hand rule" is specifically about polygons, so I don't
> see a problem there to leave LineStrings untouched.
>
> > 3) modify new functions to also consider closed LineStrings, without
> > modifying ST_ForceRHR
> >
> > I don't like the idea of modifying ST_ForceRHR, since it has existed
> > forever, and modifying this would also suggest changes to ST_ForceLHR,
> > whose implementation is contained within SFCGAL.
>
> What does ST_ForceLHR do ? Documentation doesn't say.
> Is it the reverse of ST_ForceRHR or does it use the other
> semantic ?
>
> > I'm inclined towards #1.  Do people have any thoughts on these
> > alternatives, or maybe a different solution?
>
> At least for topology, it would be useful to have an ST_IsCW or
> ST_IsCCW function accepting a closed linestring in input
> (sounds like #3)
>
> --strk;
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20170208/509f2ac0/attachment.html>


More information about the postgis-devel mailing list