[postgis-devel] ForceRHR doesn't?
Michael Fuhr
mike at fuhr.org
Sun Mar 12 11:28:41 PST 2006
On Sun, Mar 12, 2006 at 10:46:22AM -0800, Paul Ramsey wrote:
> Would not hurt, the functionality being there and all... I am
> thinking of replacing ForceRHR with ForceCCW and ForceCW, given our
> discussion about the meaning of RHR. (ForceRHR would still remain,
> but be undocumented as a means of deprecation.)
Whatever you decide to do, I'd suggest expanding the documentation
to avoid confusion. Maybe something like this:
ForceCCW(geometry)
Force the vertex order of polygons to be counterclockwise for
exterior rings and clockwise for interior rings. Traversing
a ring's points in order, the polygon's interior is on the left.
ForceCW(geometry)
Force the vertex order of polygons to be clockwise for exterior
rings and counterclockwise for interior rings. Traversing a
ring's points in order, the polygon's interior is on the right.
ForceRHR(geometry)
Same as ForceCW. Deprecated due to contradictory interpretations
of what the RHR (right-hand rule) means with respect to polygons.
(Whether it's documented or not, maybe this function could raise
a warning with a hint to use ForceCW instead).
IsCCW(geometry)
Returns true if all polygons of this geometry are in counterclockwise
order. See the explanation under ForceCCW.
IsCW(geometry)
Returns true if all polygons of this geometry are in clockwise
order. See the explanation under ForceCW.
--
Michael Fuhr
More information about the postgis-devel
mailing list