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

Sandro Santilli strk at kbt.io
Wed Feb 8 11:35:41 PST 2017


On Wed, Feb 08, 2017 at 11:35:01AM -0500, Daniel Baston wrote:
> 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?

I'd love ST_IsCW, ST_IsCCW, ST_ForceCW and ST_ForceCCW that only apply
to _closed_ LineStrings, raising an error on anything else.

As for polygons, the only missing functionality I see would be an
ST_IsRHR, to be a companion to ST_ForceRHR.

I still hadn't checked what ST_ForceLHR does. Hopefully it's just
the reverse of ST_ForceRHR, in which case we could just make sure
to make it available even when SFCGAL is not in place.

That said, I remember this whole thing started in an attempt to
reduce the confusion with the "Right Hand Rule" concept. As I
agree with you about NOT changing semantic of a very old function,
I don't see how adding more functions help.

--strk;



More information about the postgis-devel mailing list