Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
public static Coordinate operator +(Coordinate c1, Coordinate c2)
{
DecimalDegreeCoordinate dd1 = (DecimalDegreeCoordinate)TypeDescriptor.GetConverter(c1).ConvertTo(c1, typeof(DecimalDegreeCoordinate));
DecimalDegreeCoordinate dd2 = (DecimalDegreeCoordinate)TypeDescriptor.GetConverter(c2).ConvertTo(c2, typeof(DecimalDegreeCoordinate));
return new DecimalDegreeCoordinate(dd1.lat + dd2.lat, dd1.lon + dd2.lon);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment