class_docstr: .. versionadded:: 2.5.0
  
  Class to build a custom ellipsoid.
class_docstr_tok: ["..","versionadded",":",":","2.5.0","Class","to","build","a","custom","ellipsoid","."]
docstr: Parameters
  ----------
  name: str, default="undefined"
      Name of the ellipsoid.
  semi_major_axis: float, optional
      The semi major axis in meters. Required if missing radius.
  inverse_flattening: float, optional
      The inverse flattening in meters.
      Required if missing semi_minor_axis and radius.
  semi_minor_axis: float, optional
      The semi minor axis in meters.
      Required if missing inverse_flattening and radius.
  radius: float, optional
      The radius in meters. Can only be used alone.
      Cannot be mixed with other parameters.
docstr_tok: ["Parameters","--","--","--","--","--","name",":","str",",","default=","''","undefined","''","Name","of","the","ellipsoid",".","semi_major_axis",":","float",",","optional","The","semi","major","axis","in","meters",".","Required","if","missing","radius",".","inverse_flattening",":","float",",","optional","The","inverse","flattening","in","meters",".","Required","if","missing","semi_minor_axis","and","radius",".","semi_minor_axis",":","float",",","optional","The","semi","minor","axis","in","meters",".","Required","if","missing","inverse_flattening","and","radius",".","radius",":","float",",","optional","The","radius","in","meters",".","Can","only","be","used","alone",".","Can","not","be","mixed","with","other","parameters","."]
code: def __new__(
      cls,
      name: str = "undefined",
      semi_major_axis: float | None = None,
      inverse_flattening: float | None = None,
      semi_minor_axis: float | None = None,
      radius: float | None = None,
  ):
      """
      Parameters
      ----------
      name: str, default="undefined"
          Name of the ellipsoid.
      semi_major_axis: float, optional
          The semi major axis in meters. Required if missing radius.
      inverse_flattening: float, optional
          The inverse flattening in meters.
          Required if missing semi_minor_axis and radius.
      semi_minor_axis: float, optional
          The semi minor axis in meters.
          Required if missing inverse_flattening and radius.
      radius: float, optional
          The radius in meters. Can only be used alone.
          Cannot be mixed with other parameters.
      """
      ellipsoid_json: dict[str, float | str] = {
          "$schema": "https://proj.org/schemas/v0.2/projjson.schema.json",
          "type": "Ellipsoid",
          "name": name,
      }
      if semi_major_axis is not None:
          ellipsoid_json["semi_major_axis"] = semi_major_axis
      if inverse_flattening is not None:
          ellipsoid_json["inverse_flattening"] = inverse_flattening
      if semi_minor_axis is not None:
          ellipsoid_json["semi_minor_axis"] = semi_minor_axis
      if radius is not None:
          ellipsoid_json["radius"] = radius
      return cls.from_json_dict(ellipsoid_json)
  
file_path: pyproj/pyproj/crs/datum.py
imports: from typing import Any
  from pyproj._crs import Datum, Ellipsoid, PrimeMeridian
label_desc: Use image node_id 1 for calling the CustomEllipsoid obj's underlying member method code with example usage: obj.__new__(cls, name, semi_major_axis, inverse_flattening, semi_minor_axis, radius) and returns: cls