class_docstr: cuspatial.GeoSeries enables GPU-backed storage and computation of
  shapely-like objects. Our goal is to give feature parity with GeoPandas.
  At this time, only from_geopandas and to_geopandas are directly supported.
  cuspatial GIS, indexing, and trajectory functions depend on the arrays
  stored in the `GeoArrowBuffers` object, accessible with the `points`,
  `multipoints`, `lines`, and `polygons` accessors.
  
  Examples
  --------
  
  >>> from shapely.geometry import Point
      import geopandas
      import cuspatial
      cuseries = cuspatial.GeoSeries(geopandas.GeoSeries(Point(-1, 0)))
      cuseries.points.xy
      0   -1.0
      1    0.0
      dtype: float64
class_docstr_tok: ["cuspatial.GeoSeries","enables","GPU-backed","storage","and","computation","of","shapely-like","objects",".","Our","goal","is","to","give","feature","parity","with","GeoPandas",".","At","this","time",",","only","from_geopandas","and","to_geopandas","are","directly","supported",".","cuspatial","GIS",",","indexing",",","and","trajectory","functions","depend","on","the","arrays","stored","in","the","`","GeoArrowBuffers","`","object",",","accessible","with","the","`","points","`",",","`","multipoints","`",",","`","lines","`",",","and","`","polygons","`","accessors",".","Examples","--","--","--","--",">",">",">","from","shapely.geometry","import","Point","import","geopandas","import","cuspatial","cuseries","=","cuspatial.GeoSeries","(","geopandas.GeoSeries","(","Point","(","-1",",","0",")",")",")","cuseries.points.xy","0","-1.0","1","0.0","dtype",":","float64"]
docstr: Returns a `Series` of `dtype('bool')` with value `True` for each
  aligned geometry that contains _other_.
  
  Compute from a GeoSeries of points and a GeoSeries of polygons which
  points are properly contained within the corresponding polygon. Polygon
  A contains Point B properly if B intersects the interior of A but not
  the boundary (or exterior).
  
  If `allpairs=False`, the result will be a `Series` of `dtype('bool')`.
  If `allpairs=True`, the result will be a `DataFrame` containing two
  columns, `point_indices` and `polygon_indices`, each of which is a
  `Series` of `dtype('int32')`. The `point_indices` `Series` contains
  the indices of the points in the right GeoSeries, and the
  `polygon_indices` `Series` contains the indices of the polygons in the
  left GeoSeries.
  
  Parameters
  ----------
  other
      a cuspatial.GeoSeries
  align=True
      to align the indices before computing .contains or not. If the
      indices are not aligned, they will be compared based on their
      implicit row order.
  allpairs=False
      True computes the contains for all pairs of geometries
      between the two GeoSeries. False computes the contains for
      each geometry in the left GeoSeries against the corresponding
      geometry in the right GeoSeries. Defaults to False.
  
  Examples
  --------
  Test if a polygon is inside another polygon:
  
  >>> point = cuspatial.GeoSeries([Point(0.5, 0.5)])
  >>> polygon = cuspatial.GeoSeries([
  >>>     Polygon([[0, 0], [1, 0], [1, 1], [0, 0]]),
  >>> ])
  >>> print(polygon.contains(point))
  0    False
  dtype: bool
  
  Test whether three points fall within either of two polygons
  >>> point = cuspatial.GeoSeries([
  >>>     Point(0, 0),
  >>>     Point(-1, 0),
  >>>     Point(-2, 0),
  >>>     Point(0, 0),
  >>>     Point(-1, 0),
  >>>     Point(-2, 0),
  >>> ])
  >>> polygon = cuspatial.GeoSeries([
  >>>     Polygon([[0, 0], [1, 0], [1, 1], [0, 0]]),
  >>>     Polygon([[0, 0], [1, 0], [1, 1], [0, 0]]),
  >>>     Polygon([[0, 0], [1, 0], [1, 1], [0, 0]]),
  >>>     Polygon([[-2, -2], [-2, 2], [2, 2], [-2, -2]]),
  >>>     Polygon([[-2, -2], [-2, 2], [2, 2], [-2, -2]]),
  >>>     Polygon([[-2, -2], [-2, 2], [2, 2], [-2, -2]]),
  >>> ])
  >>> print(polygon.contains(point))
  0    False
  1     True
  2    False
  3    False
  4     True
  5    False
  dtype: bool
  
  Test whether three points fall within either of two polygons using
  `allpairs` mode:
  >>> point = cuspatial.GeoSeries([
  >>>     Point(0, 0),
  >>>     Point(-1, 0),
  >>>     Point(-2, 0),
  >>> ])
  >>> polygon = cuspatial.GeoSeries([
  >>>     Polygon([[0, 0], [1, 0], [1, 1], [0, 0]]),
  >>>     Polygon([[-2, -2], [-2, 2], [2, 2], [-2, -2]]),
  >>> ])
  >>> print(polygon.contains(point, allpairs=True))
  index point_indices  polygon_indices
  0                 2                1
  
  Returns
  -------
  result : cudf.Series or cudf.DataFrame
      A Series of boolean values indicating whether each point falls
      within the corresponding polygon in the input in the case of
      `allpairs=False`. A DataFrame containing two columns,
      `point_indices` and `polygon_indices`, each of which is a
      `Series` of `dtype('int32')` in the case of `allpairs=True`.
docstr_tok: ["Returns","a","`","Series","`","of","`","dtype","(","'bool","'",")","`","with","value","`","True","`","for","each","aligned","geometry","that","contains","_other_",".","Compute","from","a","GeoSeries","of","points","and","a","GeoSeries","of","polygons","which","points","are","properly","contained","within","the","corresponding","polygon",".","Polygon","A","contains","Point","B","properly","if","B","intersects","the","interior","of","A","but","not","the","boundary","(","or","exterior",")",".","If","`","allpairs=False","`",",","the","result","will","be","a","`","Series","`","of","`","dtype","(","'bool","'",")","`",".","If","`","allpairs=True","`",",","the","result","will","be","a","`","DataFrame","`","containing","two","columns",",","`","point_indices","`","and","`","polygon_indices","`",",","each","of","which","is","a","`","Series","`","of","`","dtype","(","'int32","'",")","`",".","The","`","point_indices","`","`","Series","`","contains","the","indices","of","the","points","in","the","right","GeoSeries",",","and","the","`","polygon_indices","`","`","Series","`","contains","the","indices","of","the","polygons","in","the","left","GeoSeries",".","Parameters","--","--","--","--","--","other","a","cuspatial.GeoSeries","align=True","to","align","the","indices","before","computing",".contains","or","not",".","If","the","indices","are","not","aligned",",","they","will","be","compared","based","on","their","implicit","row","order",".","allpairs=False","True","computes","the","contains","for","all","pairs","of","geometries","between","the","two","GeoSeries",".","False","computes","the","contains","for","each","geometry","in","the","left","GeoSeries","against","the","corresponding","geometry","in","the","right","GeoSeries",".","Defaults","to","False",".","Examples","--","--","--","--","Test","if","a","polygon","is","inside","another","polygon",":",">",">",">","point","=","cuspatial.GeoSeries","(","[","Point","(","0.5",",","0.5",")","]",")",">",">",">","polygon","=","cuspatial.GeoSeries","(","[",">",">",">","Polygon","(","[","[","0",",","0","]",",","[","1",",","0","]",",","[","1",",","1","]",",","[","0",",","0","]","]",")",",",">",">",">","]",")",">",">",">","print","(","polygon.contains","(","point",")",")","0","False","dtype",":","bool","Test","whether","three","points","fall","within","either","of","two","polygons",">",">",">","point","=","cuspatial.GeoSeries","(","[",">",">",">","Point","(","0",",","0",")",",",">",">",">","Point","(","-1",",","0",")",",",">",">",">","Point","(","-2",",","0",")",",",">",">",">","Point","(","0",",","0",")",",",">",">",">","Point","(","-1",",","0",")",",",">",">",">","Point","(","-2",",","0",")",",",">",">",">","]",")",">",">",">","polygon","=","cuspatial.GeoSeries","(","[",">",">",">","Polygon","(","[","[","0",",","0","]",",","[","1",",","0","]",",","[","1",",","1","]",",","[","0",",","0","]","]",")",",",">",">",">","Polygon","(","[","[","0",",","0","]",",","[","1",",","0","]",",","[","1",",","1","]",",","[","0",",","0","]","]",")",",",">",">",">","Polygon","(","[","[","0",",","0","]",",","[","1",",","0","]",",","[","1",",","1","]",",","[","0",",","0","]","]",")",",",">",">",">","Polygon","(","[","[","-2",",","-2","]",",","[","-2",",","2","]",",","[","2",",","2","]",",","[","-2",",","-2","]","]",")",",",">",">",">","Polygon","(","[","[","-2",",","-2","]",",","[","-2",",","2","]",",","[","2",",","2","]",",","[","-2",",","-2","]","]",")",",",">",">",">","Polygon","(","[","[","-2",",","-2","]",",","[","-2",",","2","]",",","[","2",",","2","]",",","[","-2",",","-2","]","]",")",",",">",">",">","]",")",">",">",">","print","(","polygon.contains","(","point",")",")","0","False","1","True","2","False","3","False","4","True","5","False","dtype",":","bool","Test","whether","three","points","fall","within","either","of","two","polygons","using","`","allpairs","`","mode",":",">",">",">","point","=","cuspatial.GeoSeries","(","[",">",">",">","Point","(","0",",","0",")",",",">",">",">","Point","(","-1",",","0",")",",",">",">",">","Point","(","-2",",","0",")",",",">",">",">","]",")",">",">",">","polygon","=","cuspatial.GeoSeries","(","[",">",">",">","Polygon","(","[","[","0",",","0","]",",","[","1",",","0","]",",","[","1",",","1","]",",","[","0",",","0","]","]",")",",",">",">",">","Polygon","(","[","[","-2",",","-2","]",",","[","-2",",","2","]",",","[","2",",","2","]",",","[","-2",",","-2","]","]",")",",",">",">",">","]",")",">",">",">","print","(","polygon.contains","(","point",",","allpairs=True",")",")","index","point_indices","polygon_indices","0","2","1","Returns","--","--","--","-","result",":","cudf.Series","or","cudf.DataFrame","A","Series","of","boolean","values","indicating","whether","each","point","falls","within","the","corresponding","polygon","in","the","input","in","the","case","of","`","allpairs=False","`",".","A","DataFrame","containing","two","columns",",","`","point_indices","`","and","`","polygon_indices","`",",","each","of","which","is","a","`","Series","`","of","`","dtype","(","'int32","'",")","`","in","the","case","of","`","allpairs=True","`","."]
code: def contains_properly(
      self, other, align=False, allpairs=False, mode="full"
  ):
      """Returns a `Series` of `dtype('bool')` with value `True` for each
      aligned geometry that contains _other_.
  
      Compute from a GeoSeries of points and a GeoSeries of polygons which
      points are properly contained within the corresponding polygon. Polygon
      A contains Point B properly if B intersects the interior of A but not
      the boundary (or exterior).
  
      If `allpairs=False`, the result will be a `Series` of `dtype('bool')`.
      If `allpairs=True`, the result will be a `DataFrame` containing two
      columns, `point_indices` and `polygon_indices`, each of which is a
      `Series` of `dtype('int32')`. The `point_indices` `Series` contains
      the indices of the points in the right GeoSeries, and the
      `polygon_indices` `Series` contains the indices of the polygons in the
      left GeoSeries.
  
      Parameters
      ----------
      other
          a cuspatial.GeoSeries
      align=True
          to align the indices before computing .contains or not. If the
          indices are not aligned, they will be compared based on their
          implicit row order.
      allpairs=False
          True computes the contains for all pairs of geometries
          between the two GeoSeries. False computes the contains for
          each geometry in the left GeoSeries against the corresponding
          geometry in the right GeoSeries. Defaults to False.
  
      Examples
      --------
      Test if a polygon is inside another polygon:
  
      >>> point = cuspatial.GeoSeries([Point(0.5, 0.5)])
      >>> polygon = cuspatial.GeoSeries([
      >>>     Polygon([[0, 0], [1, 0], [1, 1], [0, 0]]),
      >>> ])
      >>> print(polygon.contains(point))
      0    False
      dtype: bool
  
      Test whether three points fall within either of two polygons
      >>> point = cuspatial.GeoSeries([
      >>>     Point(0, 0),
      >>>     Point(-1, 0),
      >>>     Point(-2, 0),
      >>>     Point(0, 0),
      >>>     Point(-1, 0),
      >>>     Point(-2, 0),
      >>> ])
      >>> polygon = cuspatial.GeoSeries([
      >>>     Polygon([[0, 0], [1, 0], [1, 1], [0, 0]]),
      >>>     Polygon([[0, 0], [1, 0], [1, 1], [0, 0]]),
      >>>     Polygon([[0, 0], [1, 0], [1, 1], [0, 0]]),
      >>>     Polygon([[-2, -2], [-2, 2], [2, 2], [-2, -2]]),
      >>>     Polygon([[-2, -2], [-2, 2], [2, 2], [-2, -2]]),
      >>>     Polygon([[-2, -2], [-2, 2], [2, 2], [-2, -2]]),
      >>> ])
      >>> print(polygon.contains(point))
      0    False
      1     True
      2    False
      3    False
      4     True
      5    False
      dtype: bool
  
      Test whether three points fall within either of two polygons using
      `allpairs` mode:
      >>> point = cuspatial.GeoSeries([
      >>>     Point(0, 0),
      >>>     Point(-1, 0),
      >>>     Point(-2, 0),
      >>> ])
      >>> polygon = cuspatial.GeoSeries([
      >>>     Polygon([[0, 0], [1, 0], [1, 1], [0, 0]]),
      >>>     Polygon([[-2, -2], [-2, 2], [2, 2], [-2, -2]]),
      >>> ])
      >>> print(polygon.contains(point, allpairs=True))
      index point_indices  polygon_indices
      0                 2                1
  
      Returns
      -------
      result : cudf.Series or cudf.DataFrame
          A Series of boolean values indicating whether each point falls
          within the corresponding polygon in the input in the case of
          `allpairs=False`. A DataFrame containing two columns,
          `point_indices` and `polygon_indices`, each of which is a
          `Series` of `dtype('int32')` in the case of `allpairs=True`.
      """
      predicate = CONTAINS_PROPERLY_DISPATCH[
          (self.column_type, other.column_type)
      ](align=align, allpairs=allpairs, mode=mode)
      return predicate(self, other)
  
imports: from functools import cached_property
  from numbers import Integral
  from typing import Optional, Tuple, TypeVar, Union
  import cupy
  import geopandas
  import numpy
  import pandas
  import pyarrow
  from geopandas.geoseries import GeoSeries
  from shapely.geometry import LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon
  from shapely.geometry.base import BaseGeometry, BaseMultipartGeometry
  import cudf
  from cudf._typing import ColumnLike
  from cudf.core.column.column import as_column
  from cudf.core.copy_types import GatherMap
  import cuspatial.io.pygeoarrow
  from cuspatial.core._column.geocolumn import ColumnType, GeoColumn
  from cuspatial.core._column.geometa import Feature_Enum, GeoMeta
  from cuspatial.core.binops.distance_dispatch import DistanceDispatch
  from cuspatial.core.binpreds.binpred_dispatch import CONTAINS_DISPATCH, CONTAINS_PROPERLY_DISPATCH, COVERS_DISPATCH, CROSSES_DISPATCH, DISJOINT_DISPATCH, EQUALS_DISPATCH, INTERSECTS_DISPATCH, OVERLAPS_DISPATCH, TOUCHES_DISPATCH, WITHIN_DISPATCH
  from cuspatial.utils.column_utils import contains_only_linestrings, contains_only_multipoints, contains_only_points, contains_only_polygons
label_desc: Use image node_id 31 for calling the GeoSeries obj's underlying member method code with example usage: obj.contains_properly(other, align, allpairs, mode) and returns: predicate