docstr: Time creation of spatial index.
  
  Note: requires running a single query to ensure that
  lazy-building indexes are actually built.
docstr_tok: ["Time","creation","of","spatial","index",".","Note",":","requires","running","a","single","query","to","ensure","that","lazy-building","indexes","are","actually","built","."]
code: def time_index_creation(self, tree_geom_type):
      """Time creation of spatial index.
  
      Note: requires running a single query to ensure that
      lazy-building indexes are actually built.
      """
      # Note: the GeoDataFram._sindex_generated attribute will
      # be removed by GH#1444 but is kept here (in the benchmarks
      # so that we can compare pre GH#1444 to post GH#1444 if needed
      self.data[tree_geom_type]._sindex_generated = None
      self.data[tree_geom_type].geometry.values._sindex = None
      tree = self.data[tree_geom_type].sindex
      # also do a single query to ensure the index is actually
      # generated and used
      tree.query(self.data[tree_geom_type].geometry.values[0])
  
file_path: geopandas/benchmarks/sindex.py
imports: from shapely.geometry import Point
  from geopandas.tests.util import _NATURALEARTH_LOWRES
  from geopandas.tests.util import _NATURALEARTH_CITIES
  from geopandas import read_file, GeoSeries
label_desc: Use image node_id 2 for calling the BenchIndexCreation obj's underlying member method code with example usage: obj.time_index_creation(tree_geom_type) without return types