I'm trying to convert latitude and longitude coordinates into eastings and northings.
I've found (on here!) a neat way of converting eastings and northings to longitude and latitude, but I don't fully understand the projections. I'd really appreciate it if someone could explain to me how to use this same approach to convert the other way round.
from pyproj import Proj, transform
import pandas as pd
v84 = Proj(proj="latlong",towgs84="0,0,0",ellps="WGS84")
v36 = Proj(proj="latlong", k=0.9996012717, ellps="airy",
towgs84="446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894")
vgrid = Proj(init="world:bng")
def EN2LL(eastings, northings):
vlon36, vlat36 = vgrid(eastings,
northings,
inverse=True)
converted = transform(v36, v84, vlon36, vlat36)
lon = converted[0]
lat = converted[1]
return lon, lat
def LL2EN(longitude, latitude):
The def LL2EN is what I want to fill in :) Thank you