Repository: geopandas/geopandas

Issue:
BUG: warning on total_bounds / repr of all-empty GeoSeries
When your GeoSeries is all-empty (or the subset that is shown in the repr), you get a warning in the repr that is coming from the bounds calculation:

```
In [11]: s = geopandas.GeoSeries([shapely.geometry.Point()]*3)

In [12]: s
Out[12]: /home/joris/scipy/geopandas/geopandas/array.py:701: RuntimeWarning: All-NaN slice encountered
  np.nanmin(b[:, 0]),  # minx
/home/joris/scipy/geopandas/geopandas/array.py:702: RuntimeWarning: All-NaN slice encountered
  np.nanmin(b[:, 1]),  # miny
/home/joris/scipy/geopandas/geopandas/array.py:703: RuntimeWarning: All-NaN slice encountered
  np.nanmax(b[:, 2]),  # maxx
/home/joris/scipy/geopandas/geopandas/array.py:704: RuntimeWarning: All-NaN slice encountered
  np.nanmax(b[:, 3]),  # maxy

0    GEOMETRYCOLLECTION EMPTY
1    GEOMETRYCOLLECTION EMPTY
2    GEOMETRYCOLLECTION EMPTY
dtype: geometry

In [13]: s.total_bounds
/home/joris/scipy/geopandas/geopandas/array.py:701: RuntimeWarning: All-NaN slice encountered
  np.nanmin(b[:, 0]),  # minx
/home/joris/scipy/geopandas/geopandas/array.py:702: RuntimeWarning: All-NaN slice encountered
  np.nanmin(b[:, 1]),  # miny
/home/joris/scipy/geopandas/geopandas/array.py:703: RuntimeWarning: All-NaN slice encountered
  np.nanmax(b[:, 2]),  # maxx
/home/joris/scipy/geopandas/geopandas/array.py:704: RuntimeWarning: All-NaN slice encountered
  np.nanmax(b[:, 3]),  # maxy
Out[13]: array([nan, nan, nan, nan])

```

We should suppress those warnings I think, as the user cannot do anything about it (and certainly for the repr it is not informative, for the total_bounds you could still say it's useful to keep them, since the result is actually returning NaNs)
BUG: warning on total_bounds / repr of all-empty GeoSeries
When your GeoSeries is all-empty (or the subset that is shown in the repr), you get a warning in the repr that is coming from the bounds calculation:

```
In [11]: s = geopandas.GeoSeries([shapely.geometry.Point()]*3)

In [12]: s
Out[12]: /home/joris/scipy/geopandas/geopandas/array.py:701: RuntimeWarning: All-NaN slice encountered
  np.nanmin(b[:, 0]),  # minx
/home/joris/scipy/geopandas/geopandas/array.py:702: RuntimeWarning: All-NaN slice encountered
  np.nanmin(b[:, 1]),  # miny
/home/joris/scipy/geopandas/geopandas/array.py:703: RuntimeWarning: All-NaN slice encountered
  np.nanmax(b[:, 2]),  # maxx
/home/joris/scipy/geopandas/geopandas/array.py:704: RuntimeWarning: All-NaN slice encountered
  np.nanmax(b[:, 3]),  # maxy

0    GEOMETRYCOLLECTION EMPTY
1    GEOMETRYCOLLECTION EMPTY
2    GEOMETRYCOLLECTION EMPTY
dtype: geometry

In [13]: s.total_bounds
/home/joris/scipy/geopandas/geopandas/array.py:701: RuntimeWarning: All-NaN slice encountered
  np.nanmin(b[:, 0]),  # minx
/home/joris/scipy/geopandas/geopandas/array.py:702: RuntimeWarning: All-NaN slice encountered
  np.nanmin(b[:, 1]),  # miny
/home/joris/scipy/geopandas/geopandas/array.py:703: RuntimeWarning: All-NaN slice encountered
  np.nanmax(b[:, 2]),  # maxx
/home/joris/scipy/geopandas/geopandas/array.py:704: RuntimeWarning: All-NaN slice encountered
  np.nanmax(b[:, 3]),  # maxy
Out[13]: array([nan, nan, nan, nan])

```

We should suppress those warnings I think, as the user cannot do anything about it (and certainly for the repr it is not informative, for the total_bounds you could still say it's useful to keep them, since the result is actually returning NaNs)


Discussion:

Resolving patch:
diff --git a/geopandas/array.py b/geopandas/array.py
--- a/geopandas/array.py
+++ b/geopandas/array.py
@@ -981,7 +981,9 @@ def _formatter(self, boxed=False):
             if precision is None:
                 # dummy heuristic based on 10 first geometries that should
                 # work in most cases
-                xmin, ymin, xmax, ymax = self[~self.isna()][:10].total_bounds
+                with warnings.catch_warnings():
+                    warnings.simplefilter("ignore", category=RuntimeWarning)
+                    xmin, ymin, xmax, ymax = self[~self.isna()][:10].total_bounds
                 if (
                     (-180 <= xmin <= 180)
                     and (-180 <= xmax <= 180)


Test patch: