Solved! Go to Solution.
def geographic_to_web_mercator(x_lon, y_lat): if abs(x_lon) <= 180 and abs(y_lat) < 90: num = x_lon * 0.017453292519943295 x = 6378137.0 * num a = y_lat * 0.017453292519943295 x_mercator = x y_mercator = 3189068.5 * math.log((1.0 + math.sin(a)) / (1.0 - math.sin(a))) return x_mercator, y_mercator else: print('Invalid coordinate values for conversion')
def geographic_to_web_mercator(x_lon, y_lat): if abs(x_lon) <= 180 and abs(y_lat) < 90: num = x_lon * 0.017453292519943295 x = 6378137.0 * num a = y_lat * 0.017453292519943295 x_mercator = x y_mercator = 3189068.5 * math.log((1.0 + math.sin(a)) / (1.0 - math.sin(a))) return x_mercator, y_mercator else: print('Invalid coordinate values for conversion')
But surely the Arc way to do it ...