class_docstr: A simple wrapper around Shapely's STRTree.
  
  
  Parameters
  ----------
  geometry : np.array of Shapely geometries
      Geometries from which to build the spatial index.
class_docstr_tok: ["A","simple","wrapper","around","Shapely","'s","STRTree",".","Parameters","--","--","--","--","--","geometry",":","np.array","of","Shapely","geometries","Geometries","from","which","to","build","the","spatial","index","."]
docstr: Compatibility wrapper for rtree.index.Index.intersection,
  use ``query`` instead.
  
  Parameters
  ----------
  coordinates : sequence or array
      Sequence of the form (min_x, min_y, max_x, max_y)
      to query a rectangle or (x, y) to query a point.
  
  Examples
  --------
  >>> from shapely.geometry import Point, box
  >>> s = geopandas.GeoSeries(geopandas.points_from_xy(range(10), range(10)))
  >>> s
  0    POINT (0 0)
  1    POINT (1 1)
  2    POINT (2 2)
  3    POINT (3 3)
  4    POINT (4 4)
  5    POINT (5 5)
  6    POINT (6 6)
  7    POINT (7 7)
  8    POINT (8 8)
  9    POINT (9 9)
  dtype: geometry
  
  >>> s.sindex.intersection(box(1, 1, 3, 3).bounds)
  array([1, 2, 3])
  
  Alternatively, you can use ``query``:
  
  >>> s.sindex.query(box(1, 1, 3, 3))
  array([1, 2, 3])
docstr_tok: ["Compatibility","wrapper","for","rtree.index.Index.intersection",",","use","``","query","``","instead",".","Parameters","--","--","--","--","--","coordinates",":","sequence","or","array","Sequence","of","the","form","(","min_x",",","min_y",",","max_x",",","max_y",")","to","query","a","rectangle","or","(","x",",","y",")","to","query","a","point",".","Examples","--","--","--","--",">",">",">","from","shapely.geometry","import","Point",",","box",">",">",">","s","=","geopandas.GeoSeries","(","geopandas.points_from_xy","(","range","(","10",")",",","range","(","10",")",")",")",">",">",">","s","0","POINT","(","0","0",")","1","POINT","(","1","1",")","2","POINT","(","2","2",")","3","POINT","(","3","3",")","4","POINT","(","4","4",")","5","POINT","(","5","5",")","6","POINT","(","6","6",")","7","POINT","(","7","7",")","8","POINT","(","8","8",")","9","POINT","(","9","9",")","dtype",":","geometry",">",">",">","s.sindex.intersection","(","box","(","1",",","1",",","3",",","3",")",".bounds",")","array","(","[","1",",","2",",","3","]",")","Alternatively",",","you","can","use","``","query","``",":",">",">",">","s.sindex.query","(","box","(","1",",","1",",","3",",","3",")",")","array","(","[","1",",","2",",","3","]",")"]
code: def intersection(self, coordinates):
      """Compatibility wrapper for rtree.index.Index.intersection,
      use ``query`` instead.
  
      Parameters
      ----------
      coordinates : sequence or array
          Sequence of the form (min_x, min_y, max_x, max_y)
          to query a rectangle or (x, y) to query a point.
  
      Examples
      --------
      >>> from shapely.geometry import Point, box
      >>> s = geopandas.GeoSeries(geopandas.points_from_xy(range(10), range(10)))
      >>> s
      0    POINT (0 0)
      1    POINT (1 1)
      2    POINT (2 2)
      3    POINT (3 3)
      4    POINT (4 4)
      5    POINT (5 5)
      6    POINT (6 6)
      7    POINT (7 7)
      8    POINT (8 8)
      9    POINT (9 9)
      dtype: geometry
  
      >>> s.sindex.intersection(box(1, 1, 3, 3).bounds)
      array([1, 2, 3])
  
      Alternatively, you can use ``query``:
  
      >>> s.sindex.query(box(1, 1, 3, 3))
      array([1, 2, 3])
  
      """
      # TODO: we should deprecate this
      # convert bounds to geometry
      # the old API uses tuples of bound, but Shapely uses geometries
      try:
          iter(coordinates)
      except TypeError:
          # likely not an iterable
          # this is a check that rtree does, we mimic it
          # to ensure a useful failure message
          raise TypeError(
              "Invalid coordinates, must be iterable in format "
              "(minx, miny, maxx, maxy) (for bounds) or (x, y) (for points). "
              "Got `coordinates` = {}.".format(coordinates)
          )
  
      # need to convert tuple of bounds to a geometry object
      if len(coordinates) == 4:
          indexes = self._tree.query(shapely.box(*coordinates))
      elif len(coordinates) == 2:
          indexes = self._tree.query(shapely.points(*coordinates))
      else:
          raise TypeError(
              "Invalid coordinates, must be iterable in format "
              "(minx, miny, maxx, maxy) (for bounds) or (x, y) (for points). "
              "Got `coordinates` = {}.".format(coordinates)
          )
  
      return indexes
  
file_path: geopandas/geopandas/sindex.py
imports: import warnings
  import numpy
  import shapely
  from shapely.geometry.base import BaseGeometry
  from .None import array, geoseries
  from .None import _compat
label_desc: Use image node_id 7 for calling the SpatialIndex obj's underlying member method code with example usage: obj.intersection(coordinates) and returns: indexes