GeoBase#

class GeoBase(crs=None)[source]#

Base class for all geo-related classes.

Create a new GeoBase object.

Parameters:

crs – The coordinate reference system of the object.

abstract property total_bounds: np.ndarray | None#

Return the bounds of the object in [min_x, min_y, max_x, max_y] format.

Returns:

The bounds of the object in [min_x, min_y, max_x, max_y] format.

Return type:

np.ndarray | None

property crs: pyproj.CRS | None#

Return the coordinate reference system of the object.

abstract to_crs(crs, inplace=False) GeoBase | None[source]#

Transform the object to a new coordinate reference system.

Parameters:
  • crs – The coordinate reference system to transform to.

  • inplace – Whether to transform the object in place or return a new object. Defaults to False.

Returns:

The transformed object if not inplace.

Return type:

GeoBase | None