def set_selected(self, indicator):
    created = False
    out_sdf = None
    print(len(self.grid_sdf))
    for (idx, row) in enumerate(self.grid_sdf.iterrows()):
        if (not self.__getattribute__((indicator + '_url'))):
            df_current = SpatialDataFrame(columns=field_schema.get(indicator), geometry=[Geometry(json.loads(row[1].SHAPE.JSON))])
            created = True
        else:
            sp_filter = filters.intersects(Geometry(row[1].SHAPE).buffer((- 0.1)), self.grid_wkid)
            data_fl = FeatureLayer(url=self.__getattribute__((indicator + '_url')), gis=self.gis_conn)
            df_current = data_fl.query(geometry_filter=sp_filter, return_all_records=False).df
        if (idx == 0):
            out_sdf = df_current
        else:
            out_sdf = out_sdf.merge_datasets(df_current)
    self.selected = out_sdf.reset_index(drop=False)
    print(('Selected: ' + str(len(out_sdf))))
    return created
def set_selected(self, indicator):
    created = False
    out_sdf = None
    print(len(self.grid_sdf))
    for (idx, row) in enumerate(self.grid_sdf.iterrows()):
        if (not self.__getattribute__((indicator + '_url'))):
            df_current = SpatialDataFrame(columns=field_schema.get(indicator), geometry=[Geometry(json.loads(row[1].SHAPE.JSON))])
            created = True
        else:
            sp_filter = filters.intersects(Geometry(row[1].SHAPE).buffer((- 0.1)), self.grid_wkid)
            data_fl = FeatureLayer(url=self.__getattribute__((indicator + '_url')), gis=self.gis_conn)
            df_current = data_fl.query(geometry_filter=sp_filter, return_all_records=False).df
        if (idx == 0):
            out_sdf = df_current
        else:
            out_sdf = out_sdf.merge_datasets(df_current)
    self.selected = out_sdf.reset_index(drop=False)
    print(('Selected: ' + str(len(out_sdf))))
    return created