class_docstr: Automatically select scale of geometries based on extent of plotted axes.
docstr: Parameters
  ----------
  default_scale
      Coarsest scale used as default when plot is at maximum extent.
  
  limits
      Scale-extent pairs at which scale of geometries change. Must be a
      tuple of tuples ordered from coarsest to finest scales. Limit
      values are the upper bounds for their corresponding scale.
  
  Example
  -------
  
  >>> s = AdaptiveScaler('coarse',
  ...           (('intermediate', 30), ('fine', 10)))
  >>> s.scale_from_extent([-180, 180, -90, 90])
  'coarse'
  >>> s.scale_from_extent([-5, 6, 45, 56])
  'intermediate'
  >>> s.scale_from_extent([-5, 5, 45, 56])
  'fine'
docstr_tok: ["Parameters","--","--","--","--","--","default_scale","Coarsest","scale","used","as","default","when","plot","is","at","maximum","extent",".","limits","Scale-extent","pairs","at","which","scale","of","geometries","change",".","Must","be","a","tuple","of","tuples","ordered","from","coarsest","to","finest","scales",".","Limit","values","are","the","upper","bounds","for","their","corresponding","scale",".","Example","--","--","--","-",">",">",">","s","=","AdaptiveScaler","(","'coarse","'",",","...","(","(","'intermediate","'",",","30",")",",","(","'fine","'",",","10",")",")",")",">",">",">","s.scale_from_extent","(","[","-180",",","180",",","-90",",","90","]",")","'coarse'",">",">",">","s.scale_from_extent","(","[","-5",",","6",",","45",",","56","]",")","'intermediate'",">",">",">","s.scale_from_extent","(","[","-5",",","5",",","45",",","56","]",")","'fine","'"]
code: def __init__(self, default_scale, limits):
      """
      Parameters
      ----------
      default_scale
          Coarsest scale used as default when plot is at maximum extent.
  
      limits
          Scale-extent pairs at which scale of geometries change. Must be a
          tuple of tuples ordered from coarsest to finest scales. Limit
          values are the upper bounds for their corresponding scale.
  
      Example
      -------
  
      >>> s = AdaptiveScaler('coarse',
      ...           (('intermediate', 30), ('fine', 10)))
      >>> s.scale_from_extent([-180, 180, -90, 90])
      'coarse'
      >>> s.scale_from_extent([-5, 6, 45, 56])
      'intermediate'
      >>> s.scale_from_extent([-5, 5, 45, 56])
      'fine'
  
      """
      super().__init__(default_scale)
      self._default_scale = default_scale
      # Upper limit on extent in degrees.
      self._limits = limits
  
imports: from abc import ABCMeta, abstractmethod
  import numpy
  import shapely.geometry
  import cartopy.crs
  import cartopy.io.shapereader
label_desc: Use image node_id 1 to create a new AdaptiveScaler object from inherited base classes: Scaler with example: obj = AdaptiveScaler(default_scale, limits)