def test_merge_geo(self):
        # First check that we gets hits from the boros frame.
        tree = self.boros.sindex
        hits = tree.intersection((1012821.80, 229228.26), objects=True)
        self.assertEqual(
            [self.boros.ix[hit.object]['BoroName'] for hit in hits],
            ['Bronx', 'Queens'])

        # Check that we only get the Bronx from this view.
        first = self.boros[self.boros['BoroCode'] < 3]
        tree = first.sindex
        hits = tree.intersection((1012821.80, 229228.26), objects=True)
        self.assertEqual(
            [first.ix[hit.object]['BoroName'] for hit in hits],
            ['Bronx'])

        # Check that we only get Queens from this view.
        second = self.boros[self.boros['BoroCode'] >= 3]
        tree = second.sindex
        hits = tree.intersection((1012821.80, 229228.26), objects=True)
        self.assertEqual(
            [second.ix[hit.object]['BoroName'] for hit in hits],
            ['Queens'])

        # Get both the Bronx and Queens again.
        merged = first.merge(second, how='outer')
        self.assertEqual(len(merged), 5)
        self.assertEqual(merged.sindex.size, 5)
        tree = merged.sindex
        hits = tree.intersection((1012821.80, 229228.26), objects=True)
        self.assertEqual(
            [merged.ix[hit.object]['BoroName'] for hit in hits],
            ['Bronx', 'Queens'])
dataset/ETHPy150Open geopandas/geopandas/geopandas/tests/test_sindex.py/TestJoinSindex.test_merge_geo/original