From 1bf2e6e36adba4ae73deab559eb5eced35cb6e7a Mon Sep 17 00:00:00 2001 From: Zachary Coleman Date: Thu, 1 Aug 2024 13:24:47 -0600 Subject: [PATCH] adding docstring to make behavior clear --- h3.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/h3.go b/h3.go index 39e7469..dc9b036 100644 --- a/h3.go +++ b/h3.go @@ -246,6 +246,10 @@ func (p GeoPolygon) Cells(resolution int) []Cell { // describing the outline(s) of a set of hexagons. Polygon outlines will follow // GeoJSON MultiPolygon order: Each polygon will have one outer loop, which is first in // the list, followed by any holes. +// +// It is expected that all hexagons in the set have the same resolution and that the set +// contains no duplicates. Behavior is undefined if duplicates or multiple resolutions are +// present, and the algorithm may produce unexpected or invalid output. func CellsToMultiPolygon(cells []Cell) []GeoPolygon { if len(cells) == 0 { return nil