normalize method
void
normalize()
override
Converts this Geometry
to normal form (or
canonical form ). Normal form is a unique representation for Geometry
s. It can be used to test whether two Geometry
s are equal
in a way that is independent of the ordering of the coordinates within
them. Normal form equality is a stronger condition than topological
equality, but weaker than pointwise equality. The definitions for normal
form use the standard lexicographical ordering for coordinates. "Sorted in
order of coordinates" means the obvious extension of this ordering to
sequences of coordinates.
NOTE that this method mutates the value of this geometry in-place. If this is not safe and/or wanted, the geometry should be cloned prior to normalization.
Implementation
void normalize() {
shell = normalized(shell!, true);
for (int i = 0; i < holes!.length; i++) {
holes![i] = normalized(holes![i], false);
}
holes!.sort();
}