<pre>Hi Nicolas,<br><br>many thx for the hints (now I'm study better the ST_ForceRHR function), but I think <br>my need is a bit more complex (Unfortunately).<br><br>Because I don't need to know if the polygon is clockwise or counter-clockwise.<br>
I can surely assume all polygons are clockwise (for example).<br><br>But I need to know if the linestrings are same versus of the polygon boundary or are reverse versus of the polygon boundary.<br><br>Regards,<br><br>Andrea.<br>
<br>>Hi Andrea,<br>>If I understand correctly, you want your linestrings to carry an<br>>attribute telling if the polygons they come from is clockwise or<br>>counter clockwise ?<br>><br>>You could compare the original polygons and the reversed version, to<br>
>determine their orientation:<br>><br>>select st_orderingEquals(geom, st_forceRHR(geom)) from<br>><br>>(select geometryFromText('POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))', -1) as geom<br>>union<br>>select geometryFromText('POLYGON ((2 2, 2 3, 3 3, 3 2, 2 2))', -1) as<br>
>geom) as foo<br>>;<br>><br>>If you keep a link between linestrings and polygons they come from, an<br>>update to the linestrings table should be easy, then.<br><br>>HTH<br>>Nicolas<br></pre><br clear="all">
<br>-- <br>-----------------<br>Andrea Peri<br>. . . . . . . . . <br>qwerty אטלעש<br>-----------------<br><br>