When reprojecting country-border polygons from longlat:

+proj=longlat +datum=WGS84 +no_defs

to Azimuthal Equidistant:

+proj=aeqd +lat_0=26 +lon_0=126 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs

I occasionally find a polygon that is turned inside out. The settings above show an example of this. The first image shows the polygon for Argentina plotted 'as-is', and the second image shows the same data that has had long lines densified and then re-projected. The scale is adjusted for clarity. The 3rd image shows All Countries, and their polygons would be filled correctly except that the inside-out polygon for Argentina floods them all. How can I determine when a polygon will display 'inside out', and how can I then make it display correctly? I am using DotSpatial to do the re-projection, but other methods produce the same results. A grid has been overlaid for clarity.

Name:  Image1.jpg
Views: 88
Size:  52.3 KB

Name:  Image2.jpg
Views: 96
Size:  53.6 KB

Name:  Image3.jpg
Views: 88
Size:  71.9 KB