Opened 10 years ago
Closed 10 years ago
#5342 closed defect (fixed)
isClockwise() doesn't work correctly in some degenerated polygons
Reported by: | Even Rouault | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | 1.10.2 |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
In the following degenerated polygon, (5 1) is the first(and last) point, and as well the pivot point selected by the algorithm (as being the lowest rightmost vertex), but is is also reused later in the coordinate list. But the second ring should be considered as counter-clock-wise
geom = ogr.CreateGeometryFromWkt('POLYGON ((0 0,0 10,10 10,10 0,0 0),(5 1,4 3,4 2,5 1,6 2,6 3,5 1))')
Change History (3)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
I did'nt check with the Simple Feature spec if it was allowed or not. I found this (well a more complicated real-world case than the simplified example above) in a FileGDB dataset, and the intent was definitely to consider it as a hole. I've the fix and commit it as soon as my Internet connexion comes back to life.
comment:3 by , 10 years ago
Milestone: | → 1.10.2 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Nice butterfly. JTS complains that the inner ring has a ring self-intersection but draws it as a hole if it is told not to mind about the error. Is this the result you aim at?