Opened 13 years ago
Closed 11 years ago
#4098 closed defect (fixed)
ogr2ogr -wrapdateline fails in some cases
Reported by: | floledermann | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | svn-trunk |
Severity: | normal | Keywords: | |
Cc: |
Description
ogr2ogr -wrapdateline seems to cover only specific cases right now, namely polygons that cross over the dateline having positive coodinates, and only if the coordinates are within 170-190 deg.
I attached a sample shapefile with a few test cases:
0) a polygon crossing the dateline with negative coordinates 1) a polygon crossing the dateline with positive coordinates 2) a complex polygon crossing the dateline both with negative and positive coordinates 3) a degenerate case, crossing the dateline twice from negative (-185) to positive (185). This can probably not be expected to be solved correctly.
Currently only one of the cases is solved correctly by -wrapdateline (case 1). Cases 0 and 2 are not clipped at all, case 3 is clipped but degenerate (but this is probably a degenerate polygon after all that could not be expected in real life scenarios.
Attachments (7)
Change History (9)
by , 13 years ago
Attachment: | wrap_test.shp added |
---|
by , 13 years ago
Attachment: | wrap_test.dbf added |
---|
by , 13 years ago
Attachment: | wrap_test.prj added |
---|
by , 13 years ago
Attachment: | wrap_test.qpj added |
---|
by , 13 years ago
Attachment: | wrap_test.shx added |
---|
by , 13 years ago
Attachment: | wrapdateline_result.png added |
---|
Screenshot of the test shape file, current results after processing with -wrapdateline
comment:1 by , 13 years ago
Summary: | ogr2ogr -wrapdateline fails in most cases → ogr2ogr -wrapdateline fails in some cases |
---|
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Version: | unspecified → svn-trunk |
I added support for dateline offset to provide users with capability to set different offsets than 170 to -170. Also, added new key to ogr2ogr -datelineoffset to set offset (default is 10deg = 170 to -170) I think the defect is fixed in r25642
P.S. The provided shape files is invalid, as the coordinates lie outside of 180 to -180 domain.
Test shape file