Opened 13 years ago
Closed 13 years ago
#3363 closed defect (fixed)
[PATCH - Shapelib] Shapefile driver can write wrong winding order for some polygons with small area but big coordinates
Reported by: | Even Rouault | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.7.1 |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | shapelib |
Cc: |
Description
Frank, this is an issue strictly identical to #3356, but in shpopen.c. The code to detect the winding order used a variant of Green Formula which would return 0 for polygons with small area but big coordinates.
The issue can be seen when enabling the new ogr_shape_34 test I've commited in r18675.
Attached a fix that uses a more stable variant of Green Formula. Another possibility would have been to adapt the new implementation of OGRLinearRing::isClockWise() (which turns to be the old used in the read part of the shapefile driver of older GDAL), but this requires more coding.
Attachments (1)
Change History (5)
by , 13 years ago
Attachment: | ticket_3363.patch added |
---|
comment:1 by , 13 years ago
Component: | default → OGR_SF |
---|---|
Milestone: | → 1.7.1 |
Status: | new → assigned |
comment:2 by , 13 years ago
comment:3 by , 13 years ago
comment:4 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Patch applied in shapelib.