I have a lots of existing data in WGS-1984 (too much to manually edit). I need to split these lines and polygons by the international date line.

More projection information: GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]

Sample Coordinates: ([170, 0], [-170, 0], [-170, 10], [170, 10], [170, 0])

Does anyone have any python code to do this?

For regular polygons like this square it would be easy to detect if the vertical line crossing -180 (anti-meridian), but most polygons aren't nice squares. So if I could give a set of points and detect and split the polygon into a multipart polygon would be what I'm trying to do.

closed as unclear what you're asking by PolyGeo, Paul, Chad Cooper, Mapperz Jun 20 '14 at 13:50

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    Have you tried Intersect (Analysis)? – Aaron May 14 '14 at 14:07
  • Intersect does not work because ArcPy draws the points in the wrong order. – code base 5000 May 15 '14 at 14:14
  • 1
    Can you edit your Question to include the following details, please? What is the precise coordinate system(s) of this data? You say its datum is WGS 1984 but including the full *.prj file name(s) would be more helpful so that we know whether code needs to deal with Geographic and/or Projected Coordinate Systems. Is your data global? Do you have an existing feature class that includes the International Date Line? If so, is it a line or polygon feature class? Can you explain more about what does not work when you use Intersect? – PolyGeo May 19 '14 at 21:53
  • Add more information. – code base 5000 May 22 '14 at 10:57
  • The International Date Line does not follow -180 all the way: worldatlas.com/aatlas/infopage/dateline.htm – PolyGeo May 22 '14 at 12:27