code: def geodetic2isometric(
      geodetic_lat, ell: Ellipsoid = None, deg: bool = True
  ):
      """
      computes isometric latitude on an ellipsoid
  
  
      like Matlab map.geodesy.IsometricLatitudeConverter.forward()
  
      Parameters
      ----------
      geodetic_lat : float
           geodetic latitude
      ell : Ellipsoid, optional
           reference ellipsoid (default WGS84)
      deg : bool, optional
           degrees input/output  (False: radians in/out)
  
      Returns
      -------
      isolat : float
           isometric latiude
  
      Notes
      -----
      Isometric latitude is an auxiliary latitude proportional to the spacing
      of parallels of latitude on an ellipsoidal mercator projection.
      Based on Deakin, R.E., 2010, 'The Loxodrome on an Ellipsoid', Lecture Notes,
      School of Mathematical and Geospatial Sciences, RMIT University,
      January 2010
      """
  
      geodetic_lat, ell = sanitize(geodetic_lat, ell, deg)
  
      e = ell.eccentricity
  
      isometric_lat = asinh(tan(geodetic_lat)) - e * atanh(
          e * sin(geodetic_lat)
      )
      # same results
      # a1 = e * sin(geodetic_lat)
      # y = (1 - a1) / (1 + a1)
      # a2 = pi / 4 + geodetic_lat / 2
      # isometric_lat = log(tan(a2) * (y ** (e / 2)))
      # isometric_lat = log(tan(a2)) + e/2 * log((1-e*sin(geodetic_lat)) / (1+e*sin(geodetic_lat)))
  
      coslat = cos(geodetic_lat)
      i = abs(coslat) <= COS_EPS
  
      try:
          isometric_lat[i] = sign(geodetic_lat[i]) * inf
      except TypeError:
          if i:
              isometric_lat = sign(geodetic_lat) * inf
  
      if deg:
          isometric_lat = degrees(isometric_lat)
  
      try:
          return isometric_lat.squeeze()[()]
      except AttributeError:
          return isometric_lat
  
imports: from __future__ import annotations
  import warnings
  from math import pi
  from .None import rcurve
  from .ellipsoid import Ellipsoid
  from .mathfun import asinh, atan, atanh, cos, degrees, exp, inf, radians, sign, sin, sqrt, tan
  from .utils import sanitize
label_desc: Use image node_id 4 for calling a global function with example usage: geodetic2isometric(geodetic_lat, ell, deg) and returns: isometric_lat, isometric_lat