class_docstr: This operation dynamically culls and resamples Path or Polygons
  elements based on the current zoom level. On first execution a
  RTree is created using the Sort-Tile-Recursive algorithm, which is
  used to query for geometries within the current viewport (defined
  by the x_range and y_range).
  
  Any geometries returned by the RTree query are tested to ensure
  their area is over the display_threshold, expressed as a fraction
  of the current viewport area. Any remaining polygons are
  simplified using the Douglas-Peucker algorithm, which eliminates
  vertices while ensuring that the curve does not diverge from the
  original curve by more than the tolerance. The tolerance is
  expressed as a fraction of the square root of the area of the
  current viewport.
  
  Once computed a simplified geometry is cached depending on the
  current zoom level. The number of valid zoom levels can be
  declared and are used to recursively subdivide the domain into
  smaller subregions.
  
  If requested the geometries can also be clipped to the current
  viewport which avoids having to render vertices that are not
  visible.
class_docstr_tok: ["This","operation","dynamically","culls","and","resamples","Path","or","Polygons","elements","based","on","the","current","zoom","level",".","On","first","execution","a","RTree","is","created","using","the","Sort-Tile-Recursive","algorithm",",","which","is","used","to","query","for","geometries","within","the","current","viewport","(","defined","by","the","x_range","and","y_range",")",".","Any","geometries","returned","by","the","RTree","query","are","tested","to","ensure","their","area","is","over","the","display_threshold",",","expressed","as","a","fraction","of","the","current","viewport","area",".","Any","remaining","polygons","are","simplified","using","the","Douglas-Peucker","algorithm",",","which","eliminates","vertices","while","ensuring","that","the","curve","does","not","diverge","from","the","original","curve","by","more","than","the","tolerance",".","The","tolerance","is","expressed","as","a","fraction","of","the","square","root","of","the","area","of","the","current","viewport",".","Once","computed","a","simplified","geometry","is","cached","depending","on","the","current","zoom","level",".","The","number","of","valid","zoom","levels","can","be","declared","and","are","used","to","recursively","subdivide","the","domain","into","smaller","subregions",".","If","requested","the","geometries","can","also","be","clipped","to","the","current","viewport","which","avoids","having","to","render","vertices","that","are","not","visible","."]
code: def instance(self_or_cls, **params):
      inst = super().instance(**params)
      inst._cache = {}
      return inst
  
file_path: geoviews/geoviews/operation/resample.py
imports: import param
  import numpy
  from holoviews import Polygons, Path
  from holoviews.streams import RangeXY
  from holoviews import Operation
  from shapely.geometry import Polygon
  from shapely.strtree import STRtree
  from ..util import polygons_to_geom_dicts, path_to_geom_dicts, shapely_v2
label_desc: Use image node_id 1 for calling the resample_geometry obj's underlying member method code with example usage: obj.instance(_or_cls) and returns: inst