class_docstr: Base class for binary predicates. This class is an abstract base class
  and can not be instantiated directly. `BinPred` is the base class that
  implements this interface in the most general case. Child classes exist
  for each combination of left-hand and right-hand GeoSeries types and binary
  predicates. For example, a `PointPointContains` predicate is a child class
  of `BinPred` that implements the `contains_properly` predicate for two
  `Point` GeoSeries. These classes are found in the `feature_<predicateName>`
  files found in this directory.
  
  Notes
  -----
  BinPred classes are selected using the appropriate dispatch function. For
  example, the `contains_properly` predicate is selected using the
  `CONTAINS_DISPATCH` dispatch function from `binpred_dispatch.py`. The
  dispatch function selects the appropriate BinPred class based on the
  left-hand and right-hand GeoSeries types.
  
  This enables customized behavior for each combination of left-hand and
  right-hand GeoSeries types and binary predicates. For example, the
  `contains_properly` predicate for two `Point` GeoSeries is implemented
  using a `PointPointContains` BinPred class. The `contains_properly`
  predicate for a `Point` GeoSeries and a `Polygon` GeoSeries is implemented
  using a `PointPolygonContains` BinPred class. Most subclasses will be able
  to use all or 2/3rds of the methods defined in the `RootContains(BinPred)
  class`.
  
  The `RootContains` class implements the `contains_properly` predicate for
  the most common combination of left-hand and right-hand GeoSeries types.
  The `RootContains` class can be used as a template for implementing the
  `contains_properly` predicate for other combinations of left-hand and
  right-hand GeoSeries types.
  
  Examples
  --------
  >>> from cuspatial.core.binpreds.binpred_dispatch import CONTAINS_DISPATCH
  >>> from cuspatial.core.geoseries import GeoSeries
  >>> from shapely.geometry import Point, Polygon
  >>> predicate = CONTAINS_DISPATCH[(
  ...     lhs.column_type, rhs.column_type
  ... )](align=True, allpairs=False)
  >>> lhs = GeoSeries([Polygon([(0, 0), (1, 1), (1, 0)])])
  >>> rhs = GeoSeries([Point(0, 0), Point(1, 1)])
  >>> print(predicate(lhs, rhs))
  0    False
  dtype: bool
class_docstr_tok: ["Base","class","for","binary","predicates",".","This","class","is","an","abstract","base","class","and","can","not","be","instantiated","directly",".","`","BinPred","`","is","the","base","class","that","implements","this","interface","in","the","most","general","case",".","Child","classes","exist","for","each","combination","of","left-hand","and","right-hand","GeoSeries","types","and","binary","predicates",".","For","example",",","a","`","PointPointContains","`","predicate","is","a","child","class","of","`","BinPred","`","that","implements","the","`","contains_properly","`","predicate","for","two","`","Point","`","GeoSeries",".","These","classes","are","found","in","the","`","feature_","<","predicateName",">","`","files","found","in","this","directory",".","Notes","--","--","-","BinPred","classes","are","selected","using","the","appropriate","dispatch","function",".","For","example",",","the","`","contains_properly","`","predicate","is","selected","using","the","`","CONTAINS_DISPATCH","`","dispatch","function","from","`","binpred_dispatch.py","`",".","The","dispatch","function","selects","the","appropriate","BinPred","class","based","on","the","left-hand","and","right-hand","GeoSeries","types",".","This","enables","customized","behavior","for","each","combination","of","left-hand","and","right-hand","GeoSeries","types","and","binary","predicates",".","For","example",",","the","`","contains_properly","`","predicate","for","two","`","Point","`","GeoSeries","is","implemented","using","a","`","PointPointContains","`","BinPred","class",".","The","`","contains_properly","`","predicate","for","a","`","Point","`","GeoSeries","and","a","`","Polygon","`","GeoSeries","is","implemented","using","a","`","PointPolygonContains","`","BinPred","class",".","Most","subclasses","will","be","able","to","use","all","or","2\/3rds","of","the","methods","defined","in","the","`","RootContains","(","BinPred",")","class","`",".","The","`","RootContains","`","class","implements","the","`","contains_properly","`","predicate","for","the","most","common","combination","of","left-hand","and","right-hand","GeoSeries","types",".","The","`","RootContains","`","class","can","be","used","as","a","template","for","implementing","the","`","contains_properly","`","predicate","for","other","combinations","of","left-hand","and","right-hand","GeoSeries","types",".","Examples","--","--","--","--",">",">",">","from","cuspatial.core.binpreds.binpred_dispatch","import","CONTAINS_DISPATCH",">",">",">","from","cuspatial.core.geoseries","import","GeoSeries",">",">",">","from","shapely.geometry","import","Point",",","Polygon",">",">",">","predicate","=","CONTAINS_DISPATCH","[","(","...","lhs.column_type",",","rhs.column_type","...",")","]","(","align=True",",","allpairs=False",")",">",">",">","lhs","=","GeoSeries","(","[","Polygon","(","[","(","0",",","0",")",",","(","1",",","1",")",",","(","1",",","0",")","]",")","]",")",">",">",">","rhs","=","GeoSeries","(","[","Point","(","0",",","0",")",",","Point","(","1",",","1",")","]",")",">",">",">","print","(","predicate","(","lhs",",","rhs",")",")","0","False","dtype",":","bool"]
docstr: Preprocess the left-hand and right-hand GeoSeries. This method
  is implemented by the subclass.
  
  Preprocessing is used to ensure that the left-hand and right-hand
  GeoSeries are of the correct type for each of the three basic
  predicates: 'contains', 'intersects', and 'equals'. For example,
  `contains` requires that the left-hand GeoSeries be polygons or
  multipolygons and the right-hand GeoSeries be points or multipoints.
  `intersects` requires that the left-hand GeoSeries be linestrings or
  points and the right-hand GeoSeries be linestrings or points.
  `equals` requires that the left-hand and right-hand GeoSeries be
  points.
  
  Subclasses that implement `_preprocess` are responsible for calling
  `_compute_predicate` to continue the execution of the binary predicate.
  The last line of `_preprocess` as implemented by any subclass should be
  
      return self._compute_predicate(lhs, rhs, points, point_indices)
  
  Parameters
  ----------
  lhs : GeoSeries
      The original left-hand GeoSeries.
  rhs : GeoSeries
      The original right-hand GeoSeries.
  
  Returns
  -------
  result : Series
      A cudf.Series of boolean values indicating whether each feature in
      the right-hand GeoSeries satisfies the requirements of a binary
      predicate with its corresponding feature in the left-hand
      GeoSeries.
docstr_tok: ["Preprocess","the","left-hand","and","right-hand","GeoSeries",".","This","method","is","implemented","by","the","subclass",".","Preprocessing","is","used","to","ensure","that","the","left-hand","and","right-hand","GeoSeries","are","of","the","correct","type","for","each","of","the","three","basic","predicates",":","'contains","'",",","'intersects","'",",","and","'equals","'",".","For","example",",","`","contains","`","requires","that","the","left-hand","GeoSeries","be","polygons","or","multipolygons","and","the","right-hand","GeoSeries","be","points","or","multipoints",".","`","intersects","`","requires","that","the","left-hand","GeoSeries","be","linestrings","or","points","and","the","right-hand","GeoSeries","be","linestrings","or","points",".","`","equals","`","requires","that","the","left-hand","and","right-hand","GeoSeries","be","points",".","Subclasses","that","implement","`","_preprocess","`","are","responsible","for","calling","`","_compute_predicate","`","to","continue","the","execution","of","the","binary","predicate",".","The","last","line","of","`","_preprocess","`","as","implemented","by","any","subclass","should","be","return","self._compute_predicate","(","lhs",",","rhs",",","points",",","point_indices",")","Parameters","--","--","--","--","--","lhs",":","GeoSeries","The","original","left-hand","GeoSeries",".","rhs",":","GeoSeries","The","original","right-hand","GeoSeries",".","Returns","--","--","--","-","result",":","Series","A","cudf.Series","of","boolean","values","indicating","whether","each","feature","in","the","right-hand","GeoSeries","satisfies","the","requirements","of","a","binary","predicate","with","its","corresponding","feature","in","the","left-hand","GeoSeries","."]
code: def _preprocess(self, lhs: "GeoSeries", rhs: "GeoSeries") -> Series:
      """Preprocess the left-hand and right-hand GeoSeries. This method
      is implemented by the subclass.
  
      Preprocessing is used to ensure that the left-hand and right-hand
      GeoSeries are of the correct type for each of the three basic
      predicates: 'contains', 'intersects', and 'equals'. For example,
      `contains` requires that the left-hand GeoSeries be polygons or
      multipolygons and the right-hand GeoSeries be points or multipoints.
      `intersects` requires that the left-hand GeoSeries be linestrings or
      points and the right-hand GeoSeries be linestrings or points.
      `equals` requires that the left-hand and right-hand GeoSeries be
      points.
  
      Subclasses that implement `_preprocess` are responsible for calling
      `_compute_predicate` to continue the execution of the binary predicate.
      The last line of `_preprocess` as implemented by any subclass should be
  
          return self._compute_predicate(lhs, rhs, points, point_indices)
  
      Parameters
      ----------
      lhs : GeoSeries
          The original left-hand GeoSeries.
      rhs : GeoSeries
          The original right-hand GeoSeries.
  
      Returns
      -------
      result : Series
          A cudf.Series of boolean values indicating whether each feature in
          the right-hand GeoSeries satisfies the requirements of a binary
          predicate with its corresponding feature in the left-hand
          GeoSeries.
      """
      raise NotImplementedError
  
imports: from typing import TYPE_CHECKING, Tuple
  from cudf import Series
  from cuspatial.utils.binpred_utils import _false_series
label_desc: Use image node_id 4 for calling the BinPred obj's underlying member method code with example usage: obj._preprocess(lhs, rhs) without return types