class_docstr: Represents an abstract base class for a WGS84 geometry.
class_docstr_tok: ["Represents","an","abstract","base","class","for","a","WGS84","geometry","."]
code: def clean_coordinates(cls, coords, precision):
      if isinstance(coords, cls):
          return coords["coordinates"]
  
      new_coords = []
      if isinstance(coords, Geometry):
          coords = [coords]
      for coord in coords:
          if isinstance(coord, (list, tuple)):
              new_coords.append(cls.clean_coordinates(coord, precision))
          elif isinstance(coord, Geometry):
              new_coords.append(coord["coordinates"])
          elif isinstance(coord, (Real, Decimal)):
              new_coords.append(round(coord, precision))
          else:
              raise ValueError(
                  "%r is not a JSON compliant number" % coord
              )
      return new_coords
  
imports: from decimal import Decimal
  from numbers import Number, Real
  from geojson.base import GeoJSON
label_desc: Use image node_id 2 for calling the Geometry obj's underlying member method code with example usage: obj.clean_coordinates(cls, coords, precision) and returns: new_coords, coords