Skip to content

CellUnionFromIntersection calls Normalize() #111

@missinglink

Description

@missinglink

Both the CPP and Go versions of CellUnionFromIntersection state that the intersection algo produces a result that is in sorted order.

The go code calls cu.Normalize() anyway, what is the purpose of this?

geo/s2/cellunion.go

Lines 107 to 108 in 6adc566

// The output is generated in sorted order.
cu.Normalize()

The CPP code doesn't call normalize:

https://github.com/google/s2geometry/blob/0fb1b8a1474f3137c8b44a7861e31f8efd1370e2/src/s2/s2cell_union.cc#L376

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions