itacart.interop.to_geodataframe

itacart.interop.to_geodataframe(index, crs='EPSG:4326')[source]

Export a compositional index as a GeoDataFrame.

Requires the geo extra, which brings pyproj in transitively. The package does not depend on it: its geodesy is computed directly, and the extra pulls in a reprojection library for the caller’s benefit only.

Parameters:
  • index (str) – Compositional index.

  • crs (str, default: "EPSG:4326") – Target coordinate reference system; reprojected from EPSG:4326.

Return type:

GeoDataFrame

Returns:

One row per cell, carrying the declared metadata columns.

The index is checked before the extra is imported, so an address naming no cell is refused with the package’s own exception whether or not GeoPandas is installed. The other order made the answer depend on the environment: with the extra present the caller was told the cell does not exist, and without it the caller was told to install GeoPandas, which was true and was not the problem.

Raises:
Parameters:
Return type:

geopandas.GeoDataFrame