SELECT 'CG_Orientation_1', CG_Orientation(CG_ForceLHR('POLYGON((0 0,0 1,1 1,1 0,0 0))')); -- Left hand rule: counterclockwise (interior is on the left side) SELECT 'CG_Orientation_2', CG_Orientation(ST_ForceRHR('POLYGON((0 0,0 1,1 1,1 0,0 0))')); -- Right hand rule: clockwise (interior is on the right side) SELECT 'CG_Orientation_3', CG_Orientation('POLYGON((0 0,0 1,1 1,1 0,0 0))'); -- clockwise SELECT 't6065', CG_Orientation('0103000000010000000A000000890205230D6C31408177583619475140FD613B270D6C314031AA5436194751405D58985776943140195EE965DE47514085FFA6647B9F31408FC1C62B394851405D58985776943140195EE965DE475140FD613B270D6C314031AA543619475140A4613B270D6C31402FAA543619475140890205230D6C31408177583619475140320205230D6C31407E77583619475140890205230D6C31408177583619475140');