Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why do polygon vertices need to be counterclockwise?

User_1871Jun 9 2022 — edited Jun 9 2022

Regarding this polygon geometry in 18c:

select
    sys.standard.sqlerrm(substr(validation, 1, instr(validation,' ') - 1) * -1) error_description
from
    (select
        sdo_geom.validate_geometry_with_context(   
            sdo_geometry ('polygon ((10 10, 10 20, 20 20, 20 10, 10 10))', 26917), 0.005) as validation
    from dual)

Result:
ORA-13367: wrong orientation for interior/exterior rings

The docs for ORA-13367 say:
ORA-13367: wrong orientation for interior/exterior rings
Cause: In an Oracle Spatial geometry, the exterior and/or interior rings are not oriented correctly.
Action: Be sure that the exterior rings are oriented counterclockwise and the interior rings are oriented clockwise.
Question:
Why do exterior rings of a polygon need to be oriented counterclockwise?

This post has been answered by Hviehman-Oracle on Jun 9 2022
Jump to Answer
Comments
Post Details
Added on Jun 9 2022
3 comments
1,794 views