Hi Nicolas,
many thx for the hints (now I'm study better the ST_ForceRHR
function), but I think
my need is a bit more complex (Unfortunately).
Because I don't need to know if the polygon is clockwise or counter-clockwise.
I can surely assume all polygons are clockwise (for example).
But I need to know if the linestrings are same versus of the polygon
boundary or are reverse versus of the polygon boundary.
Regards,
Andrea.
>Hi Andrea,
>If I understand correctly, you want your linestrings to carry an
>attribute telling if the polygons they come from is clockwise or
>counter clockwise ?
>
>You could compare the original polygons and the reversed version, to
>determine their orientation:
>
>select st_orderingEquals(geom, st_forceRHR(geom)) from
>
>(select geometryFromText('POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))', -1) as geom
>union
>select geometryFromText('POLYGON ((2 2, 2 3, 3 3, 3 2, 2 2))', -1) as
>geom) as foo
>;
>
>If you keep a link between linestrings and polygons they come from, an
>update to the linestrings table should be easy, then.
>HTH
>Nicolas
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users