itacart.interop.cells_to_wkt

itacart.interop.cells_to_wkt(index, dissolve=False)[source]

Export a whole index as a single WKT geometry.

With dissolve false the result is a GEOMETRYCOLLECTION holding one polygon per cell. With dissolve true adjacent cells are merged, and the two seams behave differently: along the prime meridian the shared cell is a single cell claimed geometrically from both sides, so the union closes without a gap; across the antimeridian, cells that are neighbours on the ellipsoid are not neighbours in longitude and latitude, so the union leaves them apart and the result stays multi-part.

Parameters:
  • index (str) – Compositional index.

  • dissolve (bool, default: False) – Whether to merge adjacent cells into one geometry.

Return type:

str

Returns:

A WKT string.

Raises:

NonExistentCellError – If a named cell does not exist.