Skip to content
Snippets Groups Projects
Commit 9f76e002 authored by POLCHER Jan's avatar POLCHER Jan :bicyclist_tone4:
Browse files

Small corrections on the llij function for the Lambert projection.

parent 12795750
No related branches found
No related tags found
No related merge requests found
...@@ -69,14 +69,14 @@ def LC_llij(polyll, hemi, truelat1, truelat2, polei, polej, rebydx, stdlon, cone ...@@ -69,14 +69,14 @@ def LC_llij(polyll, hemi, truelat1, truelat2, polei, polej, rebydx, stdlon, cone
for lon,lat in polyll : for lon,lat in polyll :
deltalon = lon - self.stdlon deltalon = lon - stdlon
if (deltalon > +180.) : deltalon = deltalon - 360. if (deltalon > +180.) : deltalon = deltalon - 360.
if (deltalon < -180.) : deltalon = deltalon + 360. if (deltalon < -180.) : deltalon = deltalon + 360.
tl1r = truelat1 * rad_per_deg tl1r = truelat1 * rad_per_deg
ctl1r = np.cos(tl1r) ctl1r = np.cos(tl1r)
rm = self.rebydx * ctl1r/cone * (np.tan((90.*hemi-lat)*rad_per_deg/2.) / np.tan((90.*hemi-truelat1)*rad_per_deg/2.))**cone rm = rebydx * ctl1r/cone * (np.tan((90.*hemi-lat)*rad_per_deg/2.) / np.tan((90.*hemi-truelat1)*rad_per_deg/2.))**cone
arg = cone*(deltalon*rad_per_deg) arg = cone*(deltalon*rad_per_deg)
i = polei + hemi * rm * np.sin(arg) i = polei + hemi * rm * np.sin(arg)
...@@ -127,7 +127,7 @@ class LambertC: ...@@ -127,7 +127,7 @@ class LambertC:
def llij(self, polyll) : def llij(self, polyll) :
polyij = LC_llij(polyij, self.hemi, self.truelat1, self.truelat2, self.polei, self.polej, self.rebydx, self.stdlon, self.cone) polyij = LC_llij(polyll, self.hemi, self.truelat1, self.truelat2, self.polei, self.polej, self.rebydx, self.stdlon, self.cone)
return polyij return polyij
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment